Project

General

Profile

Actions

Bug #80386

closed

INCLUDE_TYPOSCRIPT condition option with custom defined condition requires double "\" in class name

Added by Andreas Allacher about 7 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Start date:
2017-03-22
Due date:
% Done:

0%

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

Description

Normally, when using custom conditions, the condition will be like this:
[TYPO3\CMS\Test\TestCondition = xx]
[global]

However, when using INCLUDE_TYPOSCRIPT like:
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:test/test.ts" extensions="ts" condition="TYPO3\\CMS\\Test\\TestCondition = xxx">

it requires the double "\" (like in the above example).
Doesn't matter if the condition is in "[" and "]" either.


Related issues 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Benni Mack almost 7 years ago

  • Target version changed from 8 LTS to next-patchlevel
Actions #2

Updated by Łukasz Uznański over 6 years ago

  • Sprint Focus set to On Location Sprint
Actions #3

Updated by Mathias Brodala about 6 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #4

Updated by Benni Mack about 5 years ago

  • Target version changed from next-patchlevel to Candidate for patchlevel
Actions #5

Updated by Riccardo De Contardi over 3 years ago

I think that it requires the double "\\" because the "\" is a character that needs escaping

should we mention it on the documentation? https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/TypoScriptSyntax/Syntax/Includes.html?highlight=include_typoscript#conditions

Actions #6

Updated by Riccardo De Contardi 11 months ago

I have to note that this issue could be obsolete, as since TYPO3 12 the includes work inside a condition e.g.

<INCLUDE_TYPOSCRIPT: source="DIR:EXT:test/test.ts" extensions="ts" condition="TYPO3\\CMS\\Test\\TestCondition = xxx">
can be written as

[TYPO3\CMS\Test\TestCondition = xx]
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:test/test.ts" extensions="ts">
[global]
Actions #7

Updated by Christian Kuhn 8 months ago

Actions #8

Updated by Christian Kuhn 8 months ago

  • Status changed from New to Closed
Actions #9

Updated by Christian Kuhn 8 months ago

I hope it's ok to close here.

Actions

Also available in: Atom PDF