Actions
Bug #99377
closedConstant substitution not working
Start date:
2022-12-15
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Using the following typoscript constants
test { a = Hi b = {$test.a} everybody }
with the following typoscript setup
page.1 = TEXT page.1.value = {$test.b}!
produced until TYPO3 v11 the following output:
Hi everybody!
With TYPO3 v12.1 the substitution from a constant used in a constant doesn't work any more and as a result the following will be rendered:
{$test.a} everybody!
Updated by Christian Kuhn almost 2 years ago
- Status changed from Accepted to Rejected
I'm afraid v12 does not support constants in constants. This has been documented as breaking:
Recursive constants were possible with the old parser but are not supported with the new parser anymore. This was never documented, the Backend Template module never showed them as resolved, only the Frontend parsed recursive constants. The simple rule is now: Never access a constant within another constant. Instances using a construct like the below one need to untie constants.
constants: foo = fooValue # This does not resolve to "fooValue" but is kept as string literal "{$foo}" bar = {$foo}
Updated by Christian Kuhn almost 2 years ago
- Related to Feature #97816: New TypoScript parser added
Updated by Christian Kuhn almost 2 years ago
It might be possible to scan for this in my upcoming syntax checker, though. the "template analyzer / Include tree" will then show such violations.
Updated by Kay Strobach over 1 year ago
Ok, where would you kick in to solve that? we have tons of projects using that functionality and this will cause have hefti migration problems.
Actions