Review main Merged

77010[BUGFIX] Dynamically set 'clear' TypoScript flag

Christian Kuhn CR +2 V +2 Normal +103 −4 updated 12/10/22, 14:03

Commit message

Not too many people know and understand the details
of the 'clear constants' and 'clear setup' flags in
TypoScript sys_template records: It not only
resets any given tree coming from previous templates,
but also triggers inclusion of TypoScript from
globals. As such, it is important to set the flags
somewhere, usually for the first template row. This
is also the main difference between the "Create
template for a new site" and "Create an extension
template" buttons: "New site" sets the clear flags
to trigger globals inclusion.

The old TypoScript parser had a convenience solution
to still include globals in case no template record
did set the 'clear' flags properly.

The new parser did not do that. We got feedback from
multiple early v12 adopters on this, who stumbled
here: If the clear flags are not set, especially the
basic rendering definitions from fluid_styled_content
are missing. Since this issue can be pretty hard to
find, the patch changes the SysTemplateTreeBuilder to
set the clear flag on the first template row if no
other row sets it. As a result, this increases b/w
compat with the old parser and integrators can
essentially forget about this flag for casual simple
setups again.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • André Kraus +1
    • Anja Leichsenring +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • André Kraus +1
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 3

Files 5

Review log 79

  1. Christian Kuhn uploaded patch set 1 12/10/22, 11:08

  2. Christian Kuhn updated the commit message in patch set 2 12/10/22, 11:10

  3. core-ci voted on patch set 1 V +1 12/10/22, 11:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34850

  4. core-ci voted on patch set 2 V +1 12/10/22, 11:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34851

  5. Anja Leichsenring voted on patch set 2 V +1 CR +1 12/10/22, 11:51

  6. André Kraus voted on patch set 2 V +1 CR +1 12/10/22, 12:47

  7. Stefan Bürk voted on patch set 2 V +1 CR +1 12/10/22, 13:49

  8. Christian Kuhn commented on patch set 2 V +2 CR +2 12/10/22, 14:02

    SysTemplateTreeBuilder.php:134

    this could be simplified, but i'll merge as-is to not loose votes, and will do simplification as drive-by with another patch.
  9. Christian Kuhn merged patch set 3 12/10/22, 14:03