Review main Merged

82560[BUGFIX] Reverse rootline for PageLayoutResolver calls

Dimitri König CR +2 V +2 Hard +554 −3 updated 02/06/24, 11:52

Commit message

There have been quite a lot of patches around the pagelayout
condition, which was introduced in early TYPO3 v11. It was
broken in the beginning and got fixed with #98044.
Soon after, a major refactoring of the ConditionMatcher
has been applied with #100047, which re-introduced bugs
regarding the pagelayout TypoScript condition. These have
partially fixed with #100764 and #100921.

The affected code is a bit messy due to a weird sorted
array returned by the 'rootline' methods and classes,
which we can't resolve right now.

The fix itself revolves a last issue by reversing the
rootline again. This was already done in the old backend
ConditionMatcher. The frontend ConditionMatcher received
the fullRootline, which is already reversed (deepest first).

With the introduction of IncludeTreeConditionMatcherVisitor
this has been unified, but the array_reverse was forgotten.

In addition, the fullRootline from the frontend controller
and BackendUtility::getPagesTSconfig() calls are sorted with
`ksort` before passed over, meaning we always receive a
top-down (root-first) rootline. Hence, the array_reverse is
a viable fix for both backend and frontend.

The patch covers BE pageTS, FE TypoScript and FE getData
with tests to cover the situation once and for all.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 6

Files 29

Show 9 more files