#104726Constants used within TypoScript setup text are not correctly displayed in "Active TypoScript"
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:
clipboard-202408251203-g6vjo.png
This behaviour is different from how constant usage from TypoScript from extensions is displayed:
clipboard-202408251205-e2l2l.png
Reviews 1
Related issues 2
Files 6
History 1112
-
Lina Wolf changed subject
Constants from the TypoScript backend report are not replaced correctly in "Active TypoScript"Constants used within TypoScript setup text are not correctly displayed in "Active TypoScript" <span data-processor="relativetime" data-value="2024-08-25T10:09:07+00:00" > 08/25/24, 10:09 </span> -
Lina Wolf commented and changed attached clipboard-202408251210-hjr9f.png <span data-processor="relativetime" data-value="2024-08-25T10:10:44+00:00" > 08/25/24, 10:10 </span>
-
Lina Wolf changed category <span data-processor="relativetime" data-value="2024-08-25T10:11:11+00:00" > 08/25/24, 10:11 </span>
-
Christian Kuhn changed Related to #97816 <span data-processor="relativetime" data-value="2024-08-28T12:51:58+00:00" > 08/28/24, 12:51 </span>
-
Franz Holzinger commented and changed attached ConstantsUnset-Example-active.png attached ConstantsUnset-Example-included,png attached Setup-ConstantsSet.png <span data-processor="relativetime" data-value="2024-09-06T13:54:29+00:00" > 09/06/24, 13:54 </span>
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.
-
Benjamin Franzke changed status
NewAccepted <span data-processor="relativetime" data-value="2024-10-07T13:31:10+00:00" > 10/07/24, 13:31 </span> -
Christian Kuhn commented <span data-processor="relativetime" data-value="2024-10-15T10:08:34+00:00" > 10/15/24, 10:08 </span>
Confirmed. Odd.
This works in both v12 and v13:
constants: myConstant.bar = foobar setup: myConstantUsage = TEXT myConstantUsage.value = foo {$myConstant.bar} barThis 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}"> } -
Christian Kuhn changed Related to #104325 <span data-processor="relativetime" data-value="2024-10-15T10:28:20+00:00" > 10/15/24, 10:28 </span>
-
Christian Kuhn commented <span data-processor="relativetime" data-value="2024-10-15T10:47:59+00:00" > 10/15/24, 10:47 </span>
This is due to strip_tags() in FineDiffViewhelper.
-
Gerrit Code Review pushed patch set 1 for main to change 86605 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2024-10-15T10:55:47+00:00" > 10/15/24, 10:55 </span> -
Christian Kuhn commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2024-10-17T10:50:09+00:00" > 10/17/24, 10:50 </span>Applied in changeset commit:d8311d963abbedf66987802c6badd69d9dafc3a9.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:33:27+00:00" > 12/02/25, 14:33 </span>
Edit: Constants are not replaced if they are used within a text but used when replaced directly without surrounding text:
clipboard-202408251210-hjr9f.png