Bug #101407
closedext_typoscript_setup.typoscript is only available in one Page Tree (Multiple Sites)
100%
Description
Only affectes installation with Multiple Sites Configuration (2 or more). Issue is only in TYPO3 12. Tested with 12.4.1 - 12.4.3.
When caching is enabled (Production) and an extension have an ext_typoscript_setup.typoscript in extension root, the typoscript is only avalailable in one PageTree (One Site).
Example Code
EXT:my_extension/ext_typoscript_setup.typoscript
plugin.tx_myextension { view { templateRootPath > templateRootPaths { 10 = EXT:my_extension/Resources/Private/SomeDifferentDirectory/Templates/ } } }
This should be available in every page tree.
Steps to reproduce: (see example_my_extension.zip attached)
1) New Clean TYPO3 12.4.3 installation (or 12.4.1, 12.4.2)
2) Have 2 Sites (PageTrees) in one Installation: example1.local and example2.local
3) Place the Plugin ("My Extension") on both Page Trees.
Test:
- Clear Cache
- Call Frontend www.example-1.com => typocript (Change of template path available)
- Call same Frontend again www.example-1.com => still working, all good
- Call Frontend www.example-2.com => Error, typoscript not available
Swap the test:
- Clear Cache
- Call Frontend www.example-2.com => typocript (Change of template path available)
- Call same Frontend again www.example-2.com => still working, all good
- Call Frontend www.example-1.com => Error, typoscript not available
Files
Updated by Steffen Mächtel over 1 year ago
- Subject changed from ext_typoscript_setup.typoscript is only avalaible in one Page Tree (MutliSite) to ext_typoscript_setup.typoscript is only available in one Page Tree (MutliSite)
Updated by Steffen Mächtel over 1 year ago
- Subject changed from ext_typoscript_setup.typoscript is only available in one Page Tree (MutliSite) to ext_typoscript_setup.typoscript is only available in one Page Tree (Multiple Sites)
Updated by Christian Kuhn over 1 year ago
- Related to Bug #101177: Broken TypoScript cache handling in multisite added
Updated by Christian Kuhn over 1 year ago
- Related to Feature #97816: New TypoScript parser added
Updated by Christian Kuhn over 1 year ago
Hey.
First: Thanks for a good how-to-reproduce and a boiled down test extension! It took me just a couple of minutes to look at this and it would have taken much longer otherwise. Thanks!
However, I'm currently unable to reproduce (details below). We've had an important cache related fix with #101177 in this area, which has been released with 12.4.3, and is in 12.4.4 as well, of course. Is there any chance you mis-measured your 12.4.3 result?
Here is what I did:- new core dev-main (v13) installation, v12 is identical in this regard, I would be very baffled if v12<->main behaves differently here.
- Create two top level pages "Example1" and "Example2", site records are created automatically
- Create a sys_template record for both, both have (db wise) root=1, clear=3, include_static="EXT:fluid_styled_content/Configuration/TypoScript/" and config:
" # Default PAGE object: page = PAGE page.typeNum = 0 page.10 < styles.content.get "
- Note the detail content of sys_template records are important, this influences caching: Same sys_template records can share things in cache - that's one of the new ts parser features. To be sure, here is my output on mariadb lowlevel (two "content identical" rows, just tstamp and crdate are different, which are not used in cache-identifier-hashes):
MariaDB [coreinstall]> select * from sys_template; +-----+-----+------------+------------+---------+--------+-----------+---------+---------+-------------+------------+----------+------+-------+----------------------------------------------------+-----------+---------------------------------------------------------------------------------------+---------+---------------------------+------------------+-------------------+ | uid | pid | tstamp | crdate | deleted | hidden | starttime | endtime | sorting | description | t3_origuid | title | root | clear | include_static_file | constants | config | basedOn | includeStaticAfterBasedOn | static_file_mode | tx_impexp_origuid | +-----+-----+------------+------------+---------+--------+-----------+---------+---------+-------------+------------+----------+------+-------+----------------------------------------------------+-----------+---------------------------------------------------------------------------------------+---------+---------------------------+------------------+-------------------+ | 1 | 1 | 1690559581 | 1690558132 | 0 | 0 | 0 | 0 | 256 | NULL | 0 | NEW SITE | 1 | 3 | EXT:fluid_styled_content/Configuration/TypoScript/ | NULL | # Default PAGE object: page = PAGE page.typeNum = 0 page.10 < styles.content.get | | 0 | 0 | 0 | | 2 | 2 | 1690559588 | 1690558664 | 0 | 0 | 0 | 0 | 256 | NULL | 0 | NEW SITE | 1 | 3 | EXT:fluid_styled_content/Configuration/TypoScript/ | NULL | # Default PAGE object: page = PAGE page.typeNum = 0 page.10 < styles.content.get | | 0 | 0 | 0 | +-----+-----+------------+------------+---------+--------+-----------+---------+---------+-------------+------------+----------+------+-------+----------------------------------------------------+-----------+---------------------------------------------------------------------------------------+---------+---------------------------+------------------+-------------------+ 2 rows in set (0,000 sec)
- Now create the two plugin content elements on the two root pages.
- Start an "icognito" browser session to call the frontend (to not have a BE user logged in).
- Call autogenerated-1: "Correct Template"
- Call autogenerated-1 again: "Correct Template"
- Call autogenerated-2: "Correct Template"
- Call autogenerated-2 again: "Correct Template"
From reading the code, I think 12.4.3 fixed the "different site" related cache issue already. Could you please re-check and tell me what I may be missing on my side to reproduce the issue in case you are still able to reproduce this?
I think it's fine, but of course we still may have missed something. It would be great if you could have just another look at this to verify if this is still an issue after the 12.4.3 fix in this area. Please point me into the right direction if this is the case.
Updated by Christian Kuhn over 1 year ago
- Status changed from New to Needs Feedback
Updated by Steffen Mächtel over 1 year ago
- File Blank_Line.png Blank_Line.png added
- File Works.png Works.png added
Hey,
i tested it again with a fresh 12.4.4 installation.
I found something:
UPDATE: The error occurs if TypoScript is not 100% identical in page tree 1 and 2. Add a blank line for example in one Page Tree TypoScript Setup and dont add the Blank line in the other.
The Error only occurs if i have a blank line in TypoScript Setup in the end. Without blank line in the end, everything works as expected. With blank line in the end, it always fails in one page tree.
@see Screenshot appended "Blank_Line.png" => Error occurs in one page tree
@see Screenshot appended "Works .png" => Both page tree work with correct template path
I repeated this test multiple times now:
Test with identical TypoScript:
- Clear Cache
- Call autogenerated-1: "Correct Template"
- Call autogenerated-1 again: "Correct Template"
- Call autogenerated-2: "Correct Template"
- Call autogenerated-2 again: "Correct Template"
Test with one TypoScript added a blank line:
- Clear Cache
- Call autogenerated-1: "Correct Template"
- Call autogenerated-1 again: "Correct Template"
- Call autogenerated-2: "WRONG Template"
- Call autogenerated-2 again: "WRONG Template"
Swap Test:
- Clear Cache
- Call autogenerated-2: "Correct Template"
- Call autogenerated-2 again: "Correct Template"
- Call autogenerated-1: "WRONG Template"
- Call autogenerated-1 again: "WRONG Template"
Updated by Christian Kuhn over 1 year ago
Confirmed. Thanks for looking at this some further!
Found issue. Patch incoming.
Updated by Gerrit Code Review over 1 year ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80240
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80240
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80220
Updated by Christian Kuhn over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e751ab2592bbe0eb9a5fc4920c2063127fbcd52d.
Updated by Jasmina Ließmann over 1 year ago
- Related to Bug #101656: Using Include TypoScript in template fails to apply included template added