Skip to content
Snippets Groups Projects
Commit 0303a9c1 authored by Nikita Hovratov's avatar Nikita Hovratov
Browse files

[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: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarNikita Hovratov <nikita.h@live.de>
parent 34229ddb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment