Review main Merged

75319[BUGFIX] Correct tree.pagelayout condition evaluation

Nikita Hovratov CR +2 V +2 Normal +99 −6 updated 08/15/22, 07:12

Commit message

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.

Review

  • Code review CR +2 Done
    • Nikita Hovratov +2
    • Stefan Bürk +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Nikita Hovratov +2
    • Stefan Bürk +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 3

Files 5

Review log 1723

  1. Nikita Hovratov uploaded patch set 1 07/28/22, 11:54

  2. core-ci voted on patch set 1 V +1 07/28/22, 12:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29637

  3. Nikita Hovratov uploaded patch set 2 07/28/22, 12:15

  4. core-ci voted on patch set 2 V +1 07/28/22, 12:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29640

  5. Nikita Hovratov uploaded patch set 3 07/28/22, 20:13

  6. core-ci voted on patch set 3 V +1 07/28/22, 20:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29671

  7. Simon Schaufelberger voted on patch set 3 V +1 CR +1 07/28/22, 20:29

  8. Christian Kuhn commented on patch set 3 CR -1 08/02/22, 14:55

    has another issue, we'll probably have a pre-patch.
  9. Christian Kuhn commented on patch set 3 08/14/22, 06:41

    on it.
  10. Christian Kuhn uploaded patch set 4 08/14/22, 10:49

  11. core-ci voted on patch set 4 V +1 08/14/22, 10:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30165

  12. Christian Kuhn voted on patch set 4 V +1 CR +1 08/14/22, 10:58

  13. Christian Kuhn updated the commit message in patch set 5 08/14/22, 11:03

  14. Christian Kuhn voted on patch set 5 V +1 CR +1 08/14/22, 11:04

  15. core-ci voted on patch set 5 V +1 08/14/22, 11:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30166

  16. Stefan Bürk voted on patch set 5 V +1 CR +1 08/14/22, 14:37

  17. Nikita Hovratov uploaded patch set 6 08/14/22, 19:37

  18. core-ci voted on patch set 6 V +1 08/14/22, 19:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30172

  19. Stefan Bürk voted on patch set 6 V +1 CR +1 08/14/22, 19:44

  20. Nikita Hovratov voted on patch set 6 V +1 CR +1 08/14/22, 19:47

  21. Christian Kuhn voted on patch set 6 V +1 CR +1 08/14/22, 21:33

  22. Nikita Hovratov voted on patch set 6 V +2 CR +2 08/15/22, 07:12

  23. Nikita Hovratov merged patch set 7 08/15/22, 07:12