#106356Workspace Preview for restricted pages not working
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
-
Roman Schilter commented <span data-processor="relativetime" data-value="2025-03-11T10:46:53+00:00" > 03/11/25, 10:46 </span>
-
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.
-
Gerrit Code Review pushed patch set 1 for main to change 88767 status
NewUnder Review <span data-processor="relativetime" data-value="2025-03-26T10:02:59+00:00" > 03/26/25, 10:02 </span> -
Roman Schilter changed Duplicates #96658 <span data-processor="relativetime" data-value="2025-03-26T10:06:29+00:00" > 03/26/25, 10:06 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 86257 <span data-processor="relativetime" data-value="2025-03-27T17:22:22+00:00" > 03/27/25, 17:22 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 86257 <span data-processor="relativetime" data-value="2025-03-27T20:29:01+00:00" > 03/27/25, 20:29 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 86257 <span data-processor="relativetime" data-value="2025-03-27T20:41:25+00:00" > 03/27/25, 20:41 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 88808 <span data-processor="relativetime" data-value="2025-03-27T20:41:42+00:00" > 03/27/25, 20:41 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 88809 <span data-processor="relativetime" data-value="2025-03-27T20:41:52+00:00" > 03/27/25, 20:41 </span>
-
Gerrit Code Review pushed patch set 2 for 12.4 to change 88809 <span data-processor="relativetime" data-value="2025-03-27T20:45:17+00:00" > 03/27/25, 20:45 </span>
-
Philipp Kitzberger commented and changed status
Under ReviewResolved <span data-processor="relativetime" data-value="2025-03-28T07:40:10+00:00" > 03/28/25, 07:40 </span>Applied in changeset commit:d2c1b0076ee27fe367506a115e93792be3eb914a.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:22:34+00:00" > 12/02/25, 14:22 </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.