Review main Merged

96665[BUGFIX] Load workspace list for a missing page without warning

Georg Tiefenbrunn CR +2 V +2 Easy +22 −1 updated 10/13/26, 17:41

Commit message

WorkspaceService::getTreeUids() appends the requested page id to the
list of page ids even if the page does not exist anymore, and then
reads t3ver_oid from the pages loaded before. For a missing page the
entry does not exist, which raises a PHP warning. The backend turns it
into an exception and the workspaces list fails to load.

The page id is now kept unchanged if there is no record for it.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Wouter Wolters +1
  • Verified V +2 Done
    • Benni Mack +2
    • Wouter Wolters +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 810

  1. Georg Tiefenbrunn uploaded patch set 1 10/13/26, 08:59

  2. core-ci voted on patch set 1 V +1 10/13/26, 09:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110992

  3. Benni Mack commented on patch set 1 CR -1 10/13/26, 10:21

    How can one reproduce this for real? If this stuff happens due to inconsistent behavior from older versions (which happened to us, I recommend using dbdoctor)
  4. Georg Tiefenbrunn uploaded patch set 2 CR -1 V +1 10/13/26, 10:58

  5. Georg Tiefenbrunn commented on patch set 2 10/13/26, 11:00

    Reply

    The row is gone after the delete, so no legacy data is involved. In the backend: 1. Switch to a workspace and create a page in the page tree. 2. Delete that page via the context menu. It has no live record, so it is removed physically. 3. Open the Workspaces module (or reload it if it is still open). It still carries the id of the deleted page. The list fails with the popup "Workspace action failed" and PHP Warning: Undefined array key <uid> in WorkspaceService::getTreeUids(). Patch set 2 covers this with a functional test: create and delete a page in the workspace through ActionService, then call selectVersionsInWorkspace() with recursion. It fails without the change and passes with it.
  6. core-ci voted on patch set 2 V +1 10/13/26, 11:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111002

  7. Benni Mack commented on patch set 2 CR +1 V +1 10/13/26, 11:56

    Reply

    thanks, got it now!
  8. Wouter Wolters voted on patch set 2 CR +1 V +1 10/13/26, 17:31

  9. Benni Mack voted on patch set 2 CR +2 V +2 10/13/26, 17:41

  10. Benni Mack merged patch set 3 10/13/26, 17:41