Bug #104726
closed
Constants used within TypoScript setup text are not correctly displayed in "Active TypoScript"
Added by Lina Wolf 3 months ago.
Updated about 1 month ago.
Description
Using the current main branch of the TYPO3 mono repository
I create one TypoScript backend root record and add the following:
- Constants:
tx_my_sitepackage {
bgCol = bg-primary
file.toplogo = EXT:my_sitepackage/Resources/Public/Images/Logo.png
}
- Setup:
page = PAGE
page {
typeNum = 0
bodyTag = <body class="{$tx_my_sitepackage.bgCol}">
10 = IMAGE
10.file = {$tx_my_sitepackage.file.toplogo}
}
When "Show constant usage" is enabled there is an empty label and the constants are replaced without beeing marked:
This behaviour is different from how constant usage from TypoScript from extensions is displayed:
Files
- Subject changed from Constants from the TypoScript backend report are not replaced correctly in "Active TypoScript" to Constants used within TypoScript setup text are not correctly displayed in "Active TypoScript"
Edit: Constants are not replaced if they are used within a text but used when replaced directly without surrounding text:
- Category set to TypoScript
I confirm this.
In my example there exists the constant plugin.tt_products.clickEnlarge, which is unset to 0. But in the active TypoScript it shows up as set to 1. I have cleared all caches in the Install Tool and backend. I have also added a local TypoScript constant which also unset it to 0. No change.
See the 3 screen shots.
- Status changed from New to Accepted
Confirmed. Odd.
This works in both v12 and v13:
constants:
myConstant.bar = foobar
setup:
myConstantUsage = TEXT
myConstantUsage.value = foo {$myConstant.bar} bar
This fails to render the constant substitution in v13, but it works in v12:
constants:
tx_my_sitepackage {
bgCol = bg-primary
}
setup:
page >
page = PAGE
page {
typeNum = 0
bodyTag = <body class="{$tx_my_sitepackage.bgCol}">
}
- Related to Task #104325: Prepare stateless DiffUtility added
This is due to strip_tags() in FineDiffViewhelper.
- Status changed from Accepted to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Also available in: Atom
PDF