Bug #72413

constants replacing in TSOB

Added by Bernd Wilke almost 4 years ago. Updated 19 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Start date:
2015-12-23
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

in TSOB you have three options for displaying constants (after you disable the option 'Crop lines'):
  • Plain substitution (default)
  • Substituted constants in green
  • UN-substituted constants in green

so constants could be substituted up to ten levels the second option does only substitute one level.

constants

test1 = myvalue
test2 = {$test1} with spaces

setup

lib {
  test = TEXT
  test.value = {$test2}
}
[global]

as the TSOB is for debugging it might be handsome to have the option to see all levels of substitution individually:
there might be another option for selecting the level of substitution.


also in this mode ('Substituted constants in green') there is no possibility to activate a condition which is based on a constant in this mode. (The condition is displayed like any other.)

constans

rootpid = 2

setup

[globalVar = TSFE:id = {$rootpid}]
page.10 = TEXT
page.10.value = this is the homepage
[global]

tsob.png View (61.8 KB) Riccardo De Contardi, 2019-09-04 22:21


Related issues

Related to TYPO3 Core - Bug #15752: Faster "substituteConstants" Closed 2006-03-02

Associated revisions

Revision 1dca8d17 (diff)
Added by Nicole Cordes over 2 years ago

[BUGFIX] Prevent different constants marker in TS parsing

Currently each time the TypoScript is parsed a new marker for constants,
which are replaces by their value, is generated. This prevents conditions
with replaced constants to be displayed as active. This patch ensures
markers are generated by constants values and therefore stay the same
in different requests.

Resolves: #78142
Related: #72413
Releases: master, 7.6
Change-Id: I4eea83908927ac48930abdd731e7412c04e529c1
Reviewed-on: https://review.typo3.org/50088
Tested-by: TYPO3com <>
Tested-by: Jasmina LieƟmann Reviewed-by: Markus Klein <markus.klein@typo3.org> Tested-by: Markus Klein <markus.klein@typo3.org> Reviewed-by: Nicole Cordes <typo3@cordes.co> Tested-by: Nicole Cordes <typo3@cordes.co>

Revision ac9baec4 (diff)
Added by Nicole Cordes over 2 years ago

[BUGFIX] Prevent different constants marker in TS parsing

Currently each time the TypoScript is parsed a new marker for constants,
which are replaces by their value, is generated. This prevents conditions
with replaced constants to be displayed as active. This patch ensures
markers are generated by constants values and therefore stay the same
in different requests.

Resolves: #78142
Related: #72413
Releases: master, 7.6
Change-Id: I4eea83908927ac48930abdd731e7412c04e529c1
Reviewed-on: https://review.typo3.org/51867
Tested-by: TYPO3com <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>

History

#1 Updated by Bernd Wilke over 3 years ago

also:
You can not see replaced constants if you choose constants to display.
no option to replace or highlight constants at all.

#2 Updated by Benni Mack about 3 years ago

  • Target version changed from 6.2.18 to Candidate for patchlevel

#3 Updated by Riccardo De Contardi 19 days ago

I tried the following test with TYPO3 8.7.27:

TS Constants:

rootpid = 20
test1 = myvalue
test2 = {$test1} with spaces

TS Setup (relevant part)

page=PAGE

[globalVar = TSFE:id = {$rootpid}]
  page.16 = TEXT 
  page.16.value = this is the homepage
[global]

page.17 = TEXT
page.17.value = {$test2}

I go to the TSOB and select: Dysplay constants: Substituded constants in green

Results:

see attached screenshot:

@Bernd Wilke you wrote:

there is no possibility to activate a condition which is based on a constant in this mode. (The condition is displayed like any other.)

I am not sure I've understood what you mean; as far as I have seen, when I check the condition [globalVar = TSFE:id = 20] the page.16 object appears on the TSOB tree

Also available in: Atom PDF