Review 11.5 Merged

75444[BUGFIX] Correct tree.pagelayout condition evaluation

Christian Kuhn CR +2 V +2 Normal +78 −5 updated 08/15/22, 07:14

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

    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 3

Files 4