Issue Bug Closed

#106356Workspace Preview for restricted pages not working

Roman Schilter 03/11/25, 09:21 updated 12/02/25, 14:22

Description

Trying to preview a (fe-group-)restricted page in a workspace will always show the root page instead of the selected page.

Steps to reproduce:
1. Create a page and restrict it to a fe-group
2. Switch to a non-LIVE workspace
3. Click “View webpage” for the previously restricted page

Expected Result:
The restricted page is displayed.

Actual Result:
The root-page of the current site is displayed.

Reviews 4

History 512

  1. Roman Schilter commented <span data-processor="relativetime" data-value="2025-03-11T10:46:53+00:00" > 03/11/25, 10:46 </span>

    The PreviewController generates the uri using the PageRouter, which in turn uses the PageRepository to fetch the page (see https://github.com/typo3/typo3/blob/f6b1178d4e8a25704223c3ebd1f0bf9e0f1faddb/typo3/sysext/core/Classes/Routing/PageRouter.php#L274).
    This page is empty in this case.

    The reason is because in the PageRepository in the function versionOL the access is checked again.
    It works when the parameter $bypassEnableFieldsCheck for versionOL is set to true.

  2. Roman Schilter commented <span data-processor="relativetime" data-value="2025-03-26T07:33:38+00:00" > 03/26/25, 07:33 </span>

    The reason why the check for frontend group access fails, even if an active fe-user session exists with the required permissions, is the empty frontend.user aspect. Because the PreviewController runs in the Backend Context the TSFE is not called and the aspect is not set.

  3. Philipp Kitzberger commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2025-03-28T07:40:10+00:00" > 03/28/25, 07:40 </span>

    Applied in changeset commit:d2c1b0076ee27fe367506a115e93792be3eb914a.