#107976EXT:workspaces preview.js crashes if editor is not an admin, because of weird access restriction
Description
In /sysext/workspaces/Configuration/Backend/AjaxRoutes.php, workspace_dispatch is only accessible if the logged in user is an admin.
So editors, that want to send their changes to admins, so they can publish it, are not getting the buttons shown.
The /typo3/ajax/workspace/dispatch endpoint sends the buttons to show to the frontend javascript,
but since the needed permissions are wrong here, the script crashes due to the 403 status result from the fetch request.
I think the line 'inheritAccessFromModule' => 'workspaces_admin', should be removed from that file.
The line was introduced in TYPO3 12 and still exists in TYPO3 13 and 14.
return [
// Set the workspace
'workspace_switch' => [
'path' => '/workspace/switch',
'target' => \TYPO3\CMS\Workspaces\Controller\AjaxController::class . '::switchWorkspaceAction',
],
'workspace_dispatch' => [
'path' => '/workspace/dispatch',
'target' => \TYPO3\CMS\Workspaces\Controller\AjaxDispatcher::class . '::dispatch',
'inheritAccessFromModule' => 'workspaces_admin',
],
];Reviews 3
Files 2
History 913
-
David Schneider commented <span data-processor="relativetime" data-value="2025-11-04T11:25:19+00:00" > 11/04/25, 11:25 </span>
-
David Schneider changed Is Regression 1 <span data-processor="relativetime" data-value="2025-11-04T11:30:27+00:00" > 11/04/25, 11:30 </span>
-
Oliver Hader commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-11-06T09:17:09+00:00" > 11/06/25, 09:17 </span>Can you please add a screenshot or describe, how to reproduce this behavior in the TYPO3 backend? Thanks in advance!
-
Oliver Hader changed Complexity
trivial<span data-processor="relativetime" data-value="2025-11-06T09:17:52+00:00" > 11/06/25, 09:17 </span> -
David Schneider commented and changed attached clipboard-202511061130-bfcar.png attached clipboard-202511061133-9juoy.png <span data-processor="relativetime" data-value="2025-11-06T10:42:44+00:00" > 11/06/25, 10:42 </span>
Steps to Reproduce
1. Set up a basic Workspace environment.
2. Use an Editor account without admin permissions — a standard workspace configuration is sufficient.
3. Have the Editor edit a page and then open the frontend preview.Actual Behavior
In the preview, the buttons to mark the page as “Ready to Publish” or “Revert” are missing.
This happens because the related API endpoint returns a 403 error, which causespreview.tsto crash.clipboard-202511061130-bfcar.png
Expected Behavior
In previous versions (or once the bug is fixed), the preview should display the full set of buttons correctly:
clipboard-202511061133-9juoy.png
Regression Information
The issue was introduced in v13.4.18 (September 9) as part of a security update:
🔗 TYPO3 commit 4a879fd4a70c8f6628f9d9bad8a15d0afd943a09 -
Oliver Hader changed status
Needs FeedbackAccepted <span data-processor="relativetime" data-value="2025-11-06T12:13:30+00:00" > 11/06/25, 12:13 </span> -
Elias Häußler changed assigned to Elias Häußler <span data-processor="relativetime" data-value="2025-11-10T10:36:17+00:00" > 11/10/25, 10:36 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 91471 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2025-11-10T12:20:59+00:00" > 11/10/25, 12:20 </span> -
Gerrit Code Review pushed patch set 2 for main to change 91471 <span data-processor="relativetime" data-value="2025-11-10T12:23:44+00:00" > 11/10/25, 12:23 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 91538 <span data-processor="relativetime" data-value="2025-11-11T10:01:26+00:00" > 11/11/25, 10:01 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 91539 <span data-processor="relativetime" data-value="2025-11-11T10:35:37+00:00" > 11/11/25, 10:35 </span>
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-11-11T14:30:10+00:00" > 11/11/25, 14:30 </span>Applied in changeset commit:6935dd4928945ee5d976f0fe8b9ba8e2c9ae8503.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T12:04:47+00:00" > 12/02/25, 12:04 </span>
I only tested this in TYPO3 13, not in 12 or 14!
In TYPO3 10 I also never had this Problem and I assume in 11 there should be no problems, since the line was introduced in 12.
I also just realized, this was introduced later on, since in TYPO3 13.1 the file is good, in 13.4 it broke.
Problematic Files:
https://github.com/TYPO3/typo3/blob/12.4/typo3/sysext/workspaces/Configuration/Backend/AjaxRoutes.php
https://github.com/TYPO3/typo3/blob/13.4/typo3/sysext/workspaces/Configuration/Backend/AjaxRoutes.php
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/workspaces/Configuration/Backend/AjaxRoutes.php
Here it works:
https://github.com/TYPO3/typo3/blob/11.5/typo3/sysext/workspaces/Configuration/Backend/AjaxRoutes.php
The Script:
https://github.com/TYPO3/typo3/blob/12.4/Build/Sources/TypeScript/workspaces/preview.ts
https://github.com/TYPO3/typo3/blob/13.4/Build/Sources/TypeScript/workspaces/preview.ts