-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Dynamically set 'clear' TypoScript flag
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. Resolves: #99331 Related: #97816 Related: #98552 Change-Id: I839e0fd04ff432911ff59bc6ec2047eb1e53be3e Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77010 Tested-by: core-ci <typo3@b13.com> Tested-by: André Kraus <info@andrekraus.com> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: André Kraus <info@andrekraus.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Stefan Bürk <stefan@buerk.tech>
- Loading branch information
Showing
5 changed files
with
103 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...l/TypoScript/IncludeTree/Fixtures/SysTemplate/twoPagesTwoTemplatesNoClearForConstants.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"pages" | ||
,"uid","pid","sorting","deleted","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","title","slug" | ||
,1,0,256,0,0,0,0,0,0,"FunctionalTest","/" | ||
,2,1,256,0,0,0,0,0,0,"Sub","/sub" | ||
"sys_template" | ||
,"uid","pid","sorting","deleted","hidden","starttime","endtime","t3_origuid","root","clear","include_static_file","constants","config","basedOn","includeStaticAfterBasedOn","static_file_mode" | ||
,1,1,256,0,0,0,0,0,1,0,"","foo=fooValue","","",0,0 | ||
,2,2,256,0,0,0,0,0,0,0,"","bar=barValue","","",0,0 |
8 changes: 8 additions & 0 deletions
8
...ional/TypoScript/IncludeTree/Fixtures/SysTemplate/twoPagesTwoTemplatesNoClearForSetup.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"pages" | ||
,"uid","pid","sorting","deleted","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","title","slug" | ||
,1,0,256,0,0,0,0,0,0,"FunctionalTest","/" | ||
,2,1,256,0,0,0,0,0,0,"Sub","/sub" | ||
"sys_template" | ||
,"uid","pid","sorting","deleted","hidden","starttime","endtime","t3_origuid","root","clear","include_static_file","constants","config","basedOn","includeStaticAfterBasedOn","static_file_mode" | ||
,1,1,256,0,0,0,0,0,1,0,"","","foo=fooValue","",0,0 | ||
,2,2,256,0,0,0,0,0,0,0,"","","bar=barValue","",0,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters