[BUGFIX] Correct tree.pagelayout condition evaluation
With #88276 a new condition has been implemented to check for current selected pageLayout in FE and BE, example: [tree.pagelayout == "pagets__simple"] This has various bugs. Frontend: * The evaluation stops at the sys_template record that has 'root' flag set. This is not in-line with the backend condition implementation, which goes further up in rootline. * The evaluation does not look for first specified layout up in rootline, but goes from root down to selected page. The condition thus calculates wrong layout when different 'backend_layout_next_level' are nested on rootline pages, it picks the uppermost set, not the lowermost one. This is fixed by using TSFE->rootLine instead of tmpl->rootLine, since TSFE->rootLine provides the full rootline in correct order. Backend: * Similar to FE, the evaluation should go up in rootline, but is processed downwards instead. This is fixed by handing over the 'reversed' full rootline. The v12 version of the patch is slightly different: Patch for issue #97963 introduced yet another bug by accessing TSFE->config['rootLine'], which isn't set at all at this point in the frontend processing chain when the page is not yet cached, or has no USER_INT or COA_INT. Resolves: #98044 Related: #88276 Related: #97963 Releases: main, 11.5 Change-Id: I1dc9a4dfc6aea6bec4d8e2eb65a6919d486f4a99 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75319 Tested-by:core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Nikita Hovratov <nikita.h@live.de>
Showing
- typo3/sysext/backend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php 6 additions, 1 deletion...uration/TypoScript/ConditionMatching/ConditionMatcher.php
- typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php 6 additions, 0 deletions...TypoScript/ConditionMatching/AbstractConditionMatcher.php
- typo3/sysext/core/Classes/TypoScript/TemplateService.php 2 additions, 2 deletionstypo3/sysext/core/Classes/TypoScript/TemplateService.php
- typo3/sysext/frontend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php 21 additions, 3 deletions...uration/TypoScript/ConditionMatching/ConditionMatcher.php
- typo3/sysext/frontend/Tests/Functional/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php 64 additions, 0 deletions...ion/TypoScript/ConditionMatching/ConditionMatcherTest.php
Please register or sign in to comment