Issue Bug Under Review Quiet

#107213Error when deleting a new page in a workspace

George Miller 08/06/25, 11:27 updated 10/02/26, 11:37

Description

Description

If you create a page in a workspace and delete it (without ever publishing it), you will get a RuntimeException.

Exact error message:
#1289917924 RuntimeException
You don’t have access to this page

How to reproduce?

  1. switch to a workspace
  2. create a new page
  3. select the page in the page tree
  4. open the page properties
  5. delete the page

Thanks for the great work on TYPO3 and all the effort

Reviews 2

History 78

  1. Georg Ringer commented and changed status New Accepted <span data-processor="relativetime" data-value="2025-08-06T12:11:46+00:00" > 08/06/25, 12:11 </span>

    not sure if really a WS issue? also can be triggered by using any random integer – as admin, e.g.
    @https://t3-main.ddev.site/typo3/module/web/layout?id=211111111@

  2. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-08-06T13:02:44+00:00" > 08/06/25, 13:02 </span>

    This also happens sometimes when I am in the filelist which uses IDs of stroage dirs and then come to the web / page layout module and then it cannot find a page uid with the matching storage uid.

    I think this is related to the ?id routing patch that tried to properly “remember” the visited page.

  3. Georg Tiefenbrunn commented <span data-processor="relativetime" data-value="2026-10-02T11:33:38+00:00" > 10/02/26, 11:33 </span>

    Still reproducible on 14.3.7 and main, for admins and editors. In a workspace, deleting a page that was created in that workspace removes the record from the database (discard) instead of setting deleted=1. The backend keeps referring to the page id afterwards:

    • Context menu “Delete” on the selected page. The content frame is reloaded with the same id. Up to 12.4 the context menu selected the first tree node in this case; the fallback was removed in change 86338 (#104457, #105120), while the drag-to-delete in the page tree still has it.
    • Delete button in the page properties. EditDocumentController is meant to replace the return URL with id=0 for this case, but the route path is computed as module/web/layout without the leading slash (getPathFromRequest() returns /typo3/), Router::match() throws, and the exception is swallowed. The redirect therefore goes back to the deleted id.
    • In both cases the module state keeps the id, so every later switch to a page module (Page, List, Workspaces, …) throws #1289917924 again, until another page is selected in the tree.

    In LIVE the page is only marked deleted, and BackendModuleValidator lets a request for a deleted page pass, so all of the above ends in the “Please select a page” state of the module. For a page that does not exist at all, it throws. That is also the case Georg Ringer describes with a random id.

    The patch handles a page id without any record like a deleted page in BackendModuleValidator. Existing pages without access still throw #1289917924 (the existing test now uses such a page instead of a missing one). With the patch, all three ways above end in the same state as in LIVE.

    Opening the Workspaces module with a deleted or missing page id then fails with a separate TypeError in ReviewController (setPageBreadcrumb(null)). In a workspace that is reproducible today with any soft-deleted page (own issue #110888).

  4. Georg Tiefenbrunn commented <span data-processor="relativetime" data-value="2026-10-02T11:36:58+00:00" > 10/02/26, 11:36 </span>

    The patch comes with a trade-off. With it, BackendModuleValidator answers differently for a page id that does not exist (the module renders its “no page selected” state) and for a page that exists but is not accessible (#1289917924). A backend user can therefore tell whether a page uid exists. I consider this acceptable:

    • Backend only, after login and module access. The page check runs only for module routes, after the backend user is authenticated and after validateModuleAccess() has confirmed access to the requested module. Nothing changes for anonymous requests or in the frontend.
    • FormEngine already tells the two cases apart (for every table). record_edit with edit[pages][<uid>]=edit shows “Record with uid 999999 from table pages not found” for a missing page (DatabaseRecordException from AbstractDatabaseRecordProvider) and “No page edit permission for user <uid> on page 2” for an existing page without access (<code>AccessDeniedException</code>). Checked as a non-admin editor on 14.3.7. Any editor with access to FormEngine can learn the same today.</uid>
    • The validator already does it for deleted pages. A soft-deleted page the user has access to passes, an existing one without access throws. The patch adds the case “no record at all” to the passing side and leaves the access check for existing pages, live or deleted, unchanged.
    • Nothing is disclosed beyond existence. The module receives no page data for a missing id. The modules check access again with readPageAccess() and show the same state as for a deleted page. I checked this for Page, List, Preview, Status, Permissions and (with #110888) Workspaces.
  5. Gerrit Code Review pushed patch set 1 for main to change 96308 status Accepted Under Review <span data-processor="relativetime" data-value="2026-10-02T11:37:54+00:00" > 10/02/26, 11:37 </span>