silverstripe-subsites/code
James Cocker 47df87f62c Fixes #135: LeftAndMain switching between subsites
When trying to switch to a different subsite from a page's editing view, it wouldn't switch. This was partly due to a $record always existing due to the homepage fallback on currentPageID : https://github.com/silverstripe/silverstripe-cms/blob/3.1/code/controllers/CMSMain.php#L816

So as currentPage() couldn't actually be used to test for the existance of a current page, I've added in a check for isset($this->owner->urlParams['ID']).

I've also moved the check for $_GET['SubsiteID’] which indicated a forced subsite switch (eg. via the dropdown switcher) above the check for a current page, as it should take precedence, and it wasn't being run when both conditions matched causing the subsite not to change.

Tested changing subsites from /admin/pages, from page edit view, from a page edit URL, and from other CMS sections such as Files and Security, and all seems to be working perfectly now.
2014-06-04 16:41:28 +01:00
..
extensions Fixes #135: LeftAndMain switching between subsites 2014-06-04 16:41:28 +01:00
forms Less intrusive doSave() overwrite of GridFieldDetailForm 2013-07-10 16:15:04 +02:00
model BUG Fixes to link rewriting when previewing subsites. 2014-04-02 13:39:01 +13:00
tasks SubsiteCopyPagesTask 2013-01-03 14:10:14 +01:00
SubsiteAdmin.php BUG Move the SubsiteList PJAX request to a dedicated Controller. 2013-10-16 13:20:54 +13:00
SubsiteReportWrapper.php More globalisation 2013-10-30 13:44:06 +01:00
SubsitesVirtualPage.php More globalisation 2013-10-30 13:44:06 +01:00
SubsiteXHRController.php BUG Refactor the access checks and initial subsite redirections. 2013-12-04 17:34:27 +13:00