You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
change to another subsite with a large number of pages
attempt to link to a page where it triggers an ajax reload
This is what is displayed in the SubsitesTreeDropdownField:
This is likely the same issue as #337, only this one only gets triggered when trying to load more json for the SubsitesTreeDropdownField.
The json url then returns a 302 redirect which redirects to the page the browser is trying to download the json from:
and in the console of the browser
We have a temporary fix in place which forces any request with the GET parameter from the SubsitesTreeDropdownField to load the sitetree json, regardless of what subsite it's on. This is the code we use:
<?phpnamespaceOP;
useSilverStripe\Subsites\Extensions\LeftAndMainSubsites;
useSilverStripe\CMS\Controllers\CMSPageEditController;
useSilverStripe\Control\Controller;
useSilverStripe\Core\Config\Config;
/** * * if the user is attempting to load the SubsitesTreeDropdownField json, we force * the global subsite to avoid any 302 redirects * * @author torleifw */class OPLeftAndMainSubsites extends LeftAndMainSubsites {
publicfunctiononBeforeInit()
{
$request = Controller::curr()->getRequest();
if($request->getVar('CopyContentFromID_SubsiteID') !== null) {
Config::inst()->set(CMSPageEditController::class, 'treats_subsite_0_as_global', true);
}
returnparent::onBeforeInit();
}
}
This is not the best fix. ideally the fix would be in SubsiteMenuExtension, and not relying on checking GET variables to trigger not redirecting the browser to the subsite you want to load the json from.
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
create a new subsite virtual page
change to another subsite with a large number of pages
attempt to link to a page where it triggers an ajax reload
This is what is displayed in the SubsitesTreeDropdownField:
This is likely the same issue as #337, only this one only gets triggered when trying to load more json for the SubsitesTreeDropdownField.
The json url then returns a 302 redirect which redirects to the page the browser is trying to download the json from:
and in the console of the browser
We have a temporary fix in place which forces any request with the GET parameter from the SubsitesTreeDropdownField to load the sitetree json, regardless of what subsite it's on. This is the code we use:
config.yml
OPLeftAndMainSubsites.php
This is not the best fix. ideally the fix would be in SubsiteMenuExtension, and not relying on checking GET variables to trigger not redirecting the browser to the subsite you want to load the json from.
The text was updated successfully, but these errors were encountered: