Project

General

Profile

Actions

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.

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

100%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Using the current main branch of the TYPO3 mono repository

I create one TypoScript backend root record and add the following:

  1. Constants:
        tx_my_sitepackage {
            bgCol = bg-primary
            file.toplogo = EXT:my_sitepackage/Resources/Public/Images/Logo.png
        }
    
    
  2. 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


Related issues 2 (0 open2 closed)

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

Actions
Related to TYPO3 Core - Task #104325: Prepare stateless DiffUtilityClosed2024-07-06

Actions
Actions #1

Updated by Lina Wolf 3 months ago

  • 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"
Actions #2

Updated by Lina Wolf 3 months ago

Edit: Constants are not replaced if they are used within a text but used when replaced directly without surrounding text:

Actions #3

Updated by Lina Wolf 3 months ago

  • Category set to TypoScript
Actions #4

Updated by Christian Kuhn 3 months ago

Updated by Franz Holzinger 3 months ago

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.

Actions #6

Updated by Benjamin Franzke about 2 months ago

  • Status changed from New to Accepted
Actions #7

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}">
}

Actions #8

Updated by Christian Kuhn about 1 month ago

  • Related to Task #104325: Prepare stateless DiffUtility added
Actions #9

Updated by Christian Kuhn about 1 month ago

This is due to strip_tags() in FineDiffViewhelper.

Actions #10

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

Actions #11

Updated by Christian Kuhn about 1 month ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF