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

    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 5