Review main Merged

92358[BUGFIX] Consider all workspace-enabled tables for stage buttons

Benni Mack CR +2 V +2 Easy +2 −8 updated 06/24/26, 12:03

Commit message

The workspace preview stage buttons (next/previous) only considered
records from 'pages' and 'tt_content' tables when calculating which
stage actions to show. This caused the buttons to not appear or work
incorrectly when workspace changes existed only in other tables
(e.g., custom extension tables with workspace support).

This limitation dates back to the original implementation in commit
fd976603f98 from 2011.

The methods getPreviousStageForElementCollection()
and getNextStageForElementCollection() were designed with a
configurable $byTableName parameter that defaulted to
['tt_content', 'pages', 'pages_language_overlay'].

However, the callers (PreviewController, ActionHandler) never passed
this parameter, always using the default. Over time, through various
refactorings, the parameter was removed entirely and the table
restriction became hardcoded.

Since the $workspaceItems array passed to these methods already
contains only records from workspace-enabled tables that the user
has permission to modify (filtered by selectVersionsInWorkspace()
with 'tables_modify'), the additional table filtering is unnecessary
and actively harmful.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1014

  1. Benni Mack uploaded patch set 1 01/16/26, 21:46

  2. core-ci voted on patch set 1 V +1 01/16/26, 21:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93638

  3. Benni Mack rebased onto patch set 2 V +1 04/21/26, 15:20

  4. core-ci voted on patch set 2 V +1 04/21/26, 15:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100663

  5. Christian Kuhn voted on patch set 2 CR +1 V +1 04/21/26, 15:44

  6. Benni Mack updated the commit message in patch set 3 CR +1 V +1 04/22/26, 06:55

  7. core-ci voted on patch set 3 V -1 04/22/26, 12:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100832

  8. Benni Mack rebased onto patch set 4 V -1 04/28/26, 15:49

  9. core-ci voted on patch set 4 V +1 04/28/26, 16:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101222

  10. Christian Kuhn wrote 06/18/26, 23:11

    Removed reviewer Christian Kuhn.
  11. Oli Bartsch voted on patch set 4 CR +1 V +1 06/23/26, 08:21

  12. Simon Schaufelberger voted on patch set 4 CR +1 V +1 06/23/26, 13:57

  13. Oli Bartsch voted on patch set 4 CR +2 V +2 06/24/26, 12:03

  14. Oli Bartsch merged patch set 5 06/24/26, 12:03