Bug #88478

INCLUDE_TYPOSCRIPT condition parameter not evaluating symfony expressions

Added by Christian Eßl about 1 month ago. Updated about 1 month ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2019-06-03
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

There is a "condition"-Parameter for the include-instruction for importing TS files only if a TS condition is matched. These appear to not allow for symfony expressions at the moment.

Example:

This is working (old syntax):

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:theme/Configuration/TypoScript/Constants/Development.typoscript" condition="[applicationContext = Development]">

This is not working (symfony expression):

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:theme/Configuration/TypoScript/Constants/Development.typoscript" condition="[applicationContext == "Development"]">

History

#1 Updated by Jan Stockfisch about 1 month ago

Christian Eßl wrote:

This is not working (symfony expression):

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:theme/Configuration/TypoScript/Constants/Development.typoscript" condition="[applicationContext == "Development"]">

Hi Christian,

Try using single quotes inside the double quotes. While using quotes, your code should work as expected. Otherwise escaping will work too.

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:theme/Configuration/TypoScript/Constants/Development.typoscript" condition="[applicationContext == 'Development']">

OR

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:theme/Configuration/TypoScript/Constants/Development.typoscript" condition="[applicationContext == \"Development\"]">

Using double quotes inside double quotes will result in an expression like this:

[applicationContext == 

#2 Updated by Jan Stockfisch about 1 month ago

  • Status changed from New to Needs Feedback

Also available in: Atom PDF