Review main Ready for review

84998[BUGFIX] Properly evaluate preview requirements for rootline

Oli Bartsch CR -2 V -1 Normal +127 −22 updated 11/19/26, 09:50

Commit message

To find out whether preview is required for the current
page, the rootline has to be checked for pages having the
"extendToSubpages" option with access restrictions set.

However, it has not been checked whether those restrictions
apply to the current request at all, e.g. "fe_group" might
be set while a corresponding frontend user is logged in, or
"starttime" might already have passed. Additionally, only
the nearest page with "extendToSubpages" was evaluated.

This is now fixed by using the RecordAccessVoter for every
page of the rootline, the same check page resolving applies
to the rootline later on. Only if access is currently not
granted, preview is required.

Date and user group (ADMCMD_simTime, ADMCMD_simUser) are now
simulated before the page and its rootline are checked. If
the simulation grants access, hidden pages are no longer
included, so they do not show up in menus while simulating.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 9
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/98/84998/9 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/98/84998/9 && git cherry-pick FETCH_HEAD

Review

  • Code review CR -2 Blocked
    • Oli Bartsch -2
  • Verified V -1 Blocked
    • core-ci -1 CI

Relation chain 2

  1. 84998 [BUGFIX] Properly evaluate preview requirements for rootline This change

  2. main 97265[BUGFIX] Skip group simulation for group members This change is based on it Merged Benni Mack CR +2 V +2 → 14.3 Normal +109 −0

Merge conflicts 1

Issues 2

Files 4

Review log 1423

  1. Oli Bartsch uploaded patch set 1 06/28/24, 15:26

  2. core-ci voted on patch set 1 V +1 06/28/24, 15:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60573

  3. Benni Mack uploaded patch set 2 V +1 07/02/24, 17:53

  4. core-ci voted on patch set 2 V +1 07/02/24, 17:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60857

  5. Fabien Udriot voted on patch set 2 CR +1 07/10/24, 11:01

  6. Oli Bartsch commented on patch set 2 CR -2 07/10/24, 12:39

    Working on tests.
  7. Benni Mack updated the commit message in patch set 3 CR +1 V +1 10/18/24, 13:37

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  8. core-ci voted on patch set 3 V -1 10/18/24, 22:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68007

  9. Benni Mack marked it work in progress 03/22/25, 12:33

  10. Benni Mack uploaded patch set 4 V -1 04/11/25, 12:08

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  11. core-ci voted on patch set 4 V +1 04/11/25, 12:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77526

  12. Benni Mack commented on patch set 4 05/16/25, 08:58

    PreviewSimulator.php:120

    should this "break" also be removed?
  13. Oli Bartsch rebased onto patch set 5 V +1 05/19/25, 08:31

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  14. core-ci voted on patch set 5 V +1 05/19/25, 08:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79140

  15. Oli Bartsch uploaded patch set 6 V +1 11/06/26, 08:54

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  16. core-ci voted on patch set 6 V -1 11/06/26, 09:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113470

  17. Oli Bartsch rebased onto patch set 7 V -1 11/06/26, 09:52

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  18. core-ci voted on patch set 7 V +1 11/06/26, 10:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113479

  19. Benni Mack uploaded patch set 8 V +1 11/19/26, 09:23

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  20. Benni Mack commented on patch set 8 11/19/26, 09:29

    This change is ready for review.
    Hi Oli, I pushed patch set 8 on top of #97265, since both touch PreviewSimulator and add the same test class. In addition I did this: - simulateDate() / simulateUserGroup() now run before the page and rootline checks. If the simulated group or time grants access to the rootline, includeHiddenPages stays off, so hidden pages no longer show up in menus during simulation. The current page is evaluated at the simulated time as well. Two tests cover this (they fail without the reorder). Your -2 from 2024 ("Working on tests") was copied again. Tests are there now, so could you remove it if you're fine with the changes? Would be cool if you read through my changes compared to your version.

    PreviewSimulator.php:120 Reply

    Done
  21. core-ci voted on patch set 8 V -1 11/19/26, 09:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114983

  22. Benni Mack rebased onto patch set 9 V -1 11/19/26, 09:37

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  23. core-ci voted on patch set 9 V -1 11/19/26, 09:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114987