Project

General

Profile

Actions

Feature #101752

closed

Add event to the Typoscript FE Controller to let the users replace nested TS constants

Added by Julian Mair 9 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2023-08-25
Due date:
% Done:

100%

Estimated time:
PHP Version:
8.2
Tags:
Complexity:
Sprint Focus:

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


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #101523: Config `page.config.headerComment` can not resolve TS constants anymoreRejected2023-08-01

Actions
Related to TYPO3 Core - Feature #97816: New TypoScript parserClosed2022-06-27

Actions
Actions

Also available in: Atom PDF