Issue Bug Closed

#107976EXT:workspaces preview.js crashes if editor is not an admin, because of weird access restriction

David Schneider 11/04/25, 11:18 updated 12/02/25, 12:04

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

  1. Oliver Hader commented and changed status New Needs 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!

  2. 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 causes preview.ts to 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

  3. Gerrit Code Review pushed patch set 1 for main to change 91471 status Accepted Under Review <span data-processor="relativetime" data-value="2025-11-10T12:20:59+00:00" > 11/10/25, 12:20 </span>

  4. Anonymous commented and changed status Under Review Resolved done 0 % 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.