0
votes

I am experiencing a strange behaviour. I have a TYPO3 7.6.18 and a TS condition like shown on https://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Reference/Index.html#id45

Constants:

testswitch = 1

Setup:

testvar = {$testswitch}
[globalVar = LIT:1 = {$testswitch}]
  testvar = 99
[global]

I expect testvar to be 99, but instead it is 1 (checked via TypoScript Object Browser). Any explanation? What am I doing wrong? Is this a TYPO3 bug?

1

1 Answers

2
votes

In the TypoScript Object Browser is a list of conditions at the bottom. You have to actually activate the specific condition, for it to take effect, otherwise it won't show up as expected in the tree.

Edit addition: That also means that testing conditions in the Object Browser does not necessarily help. Setting the checkbox will evaluate the condition as true, regardless of whether the condition would actually be true if evaluated normally in frontend.