Project

General

Profile

Actions

Bug #81902

closed

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

Added by Christian Weiske over 7 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2017-07-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions

Also available in: Atom PDF