Bug #81902
closedAccessing new pages via speaking URL does not work in workspace preview links
0%
Description
When visiting a workspace preview link, accessing pages by their speaking URL does not work - if they have been created in that workspace and not been published yet.
Steps to reproduce¶
- Activate a speaking URL generator like realurl
- Create workspace
- Create new page in workspace, link it from the main page by its speaking URL
- Create a workspace preview link to the main page
- Open the preview link in a new browser/incognito mode
- Click the link to the new page with the speaking URL
- An error occurs
Broken rootline. Could not resolve page with uid 2342.
https://typo3.org/go/exception/CMS/1343464101
Cause¶
typo3/sysext/frontend/Classes/Http/RequestHandler.php
calls two methods:
- line 123: initializeBackendUser()
- line 138: checkAlternativeIdMethods()
initializeBackendUser()
is called first (before the speaking page URL is resolved to a page ID), and calls a hook postBeUser
.
On of the registered hook callbacks is typo3/sysext/version/Classes/Hook/PreviewHook.php
method initializePreviewUser()
.
It uses the TSFE page ID to check if the user is allowed to access the workspace:
$params['BE_USER']->isInWebMount($pObj->id)
At this time, the speaking URL handler has not been called yet.
Because of that, access is being denied to the page with the "Broken rootline" message.
Hack fix¶
We set the following config to circumvent the issue for now:
$GLOBALS['TYPO3_CONF_VARS']['BE']['lockBeUserToDBmounts'] = 0;
This lessens security unfortunately.