Bug #104726
closedConstants used within TypoScript setup text are not correctly displayed in "Active TypoScript"
100%
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
Updated by Christian Kuhn 3 months ago
- Related to Feature #97816: New TypoScript parser added
Updated by Franz Holzinger 3 months ago
- File ConstantsUnset-Example-active.png ConstantsUnset-Example-active.png added
- File ConstantsUnset-Example-included,png ConstantsUnset-Example-included,png added
- File Setup-ConstantsSet.png Setup-ConstantsSet.png added
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.
Updated by Benjamin Franzke about 2 months ago
- Status changed from New to Accepted
Updated by Christian Kuhn about 1 month ago ยท Edited
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}"> }
Updated by Christian Kuhn about 1 month ago
- Related to Task #104325: Prepare stateless DiffUtility added
Updated by Christian Kuhn about 1 month ago
This is due to strip_tags() in FineDiffViewhelper.
Updated by Gerrit Code Review about 1 month ago
- Status changed from Accepted 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/+/86605
Updated by Christian Kuhn about 1 month ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d8311d963abbedf66987802c6badd69d9dafc3a9.