Feature #101752
closedAdd event to the Typoscript FE Controller to let the users replace nested TS constants
100%
Description
As mentioned in #101523, nested (= recursive) Typoscript constants doesn't work anymore since Typo3 v12 cause of the newly introduced TypoScript Parser.
To be fair: it was never a promised/documented feature and there were valid reasons to not implement this in core anymore.
One main reason is that I did not find an acceptable simple solution to implement this better than "O(m) * O(n)" with m being the substitution depth and n the number of nodes in the tree.
(https://forge.typo3.org/issues/101523#note-12)
I hope, even if the core won't implement a complete implemention of this feature, there will be at least an option (like an event or hook) to substitute potential nested constants under the responsibility by the user itself.
Solution:
After the merge (or apply via composer patches) of the patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/81078 the extension https://packagist.org/packages/m41r/nested-typoscript-constants can be installed as a drop-in-replacement. No further code adjustments needed.
Suggestion:
Dispatch an event after line: https://github.com/TYPO3/typo3/blob/v12.4.5/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php#L1321 to adjust the $flatSettings property in \TYPO3\CMS\Core\TypoScript\FrontendTypoScript:class (a setter has to be added)
Requested target version:
>= Typo3 v12