Issue Bug Closed

#81902Accessing new pages via speaking URL does not work in workspace preview links

Christian Weiske 07/18/17, 08:45 updated 09/24/19, 12:45

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

  1. Activate a speaking URL generator like realurl
  2. Create workspace
  3. Create new page in workspace, link it from the main page by its speaking URL
  4. Create a workspace preview link to the main page
  5. Open the preview link in a new browser/incognito mode
  6. Click the link to the new page with the speaking URL
  7. 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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.