@Findus23 opened this Issue on March 19th 2020 Member
  1. view a report for a siteid
  2. go to website management
  3. delete this website (e.g. 26)
  4. notice that the URL is still https://matomo.example/index.php?module=SitesManager&action=index&idSite=26&period=month&date=today&showaddsite=false
  5. Go to an admin page that depends on the siteid like e.g. Tracking Code
  6. An unexpected website was found in the request: website id was set to '26' . (as the siteID in the URL is still 26 which doesn't exist anymore
@sgiehl commented on March 19th 2020 Member

@Findus23 was 26 your lowest page id?

@sgiehl commented on March 19th 2020 Member

ah no. Seems that's an edge case. That seems to happen when you remove the only site that is currently displayed in the sitesmanager list (e.g. last page in pagination). If there is another page displayed, it will be switched to that page.
See https://github.com/matomo-org/matomo/blob/4.x-dev/plugins/SitesManager/angularjs/sites-manager/sites-manager-site.controller.js#L192-L208

Powered by GitHub Issue Mirror