Project

General

Profile

Actions

Bug #91361

closed

TypoScript - PageTS not loaded if a bracket exists in the key

Added by Christian Hackl almost 4 years ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2020-05-11
Due date:
% Done:

0%

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

Description

After updating from TYPO3 7 to 9 I noticed the following:
PageTs will not be loaded if a bracket exists in the key.
Strangely explained I try to show it with an example:

TCEFORM {
    tt_content {
        pi_flexform.ttaddress_listview.sDISPLAY.settings\.displayMode.addItems {
            mykey(something) = label
        }
    }
}

RTE {
    default {
        preset = rte_theme
    }
}

Then everything after this "mykey(something)" is no longer loaded.
If you remove the brackets, the remaining TS (here RTE) is loaded.

(yes brackets in the key are not good - but I think I should at least be logged or something like that)


Related issues 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Josef Glatz almost 4 years ago

  • Category set to TypoScript
  • Status changed from New to Needs Feedback

I never saw TypoScript snippets where parenthesis (brackets) are in use within object names (or as part of object names) since TYPO3 3.8. According to https://docs.typo3.org/m/typo3/tutorial-typoscript-in-45-minutes/10.4/en-us/TypoScriptOverview/FirstSteps/Index.html?highlight=parenthesis shows me that also:

Parenthesis (()) are used for writing text values on more than one line.

Do you have some reference for us? Or probably the place within the code of the TYPO3 core why such thing should have worked?

Actions #2

Updated by Bernd Wilke almost 4 years ago

If those parenthesis worked before as a name I would consider it a bug or unwanted side effect as it does not conform the rules of typoscript.
Any opening parenthesis before an equal sign should open a multiline value, which ends with a line starting with a closing parenthesis (after white space), while the rests of these both lines are ignored.

Maybe the handling of whitespace as a seperator of object-/property-names and operator has changed and the splitting (and interpreting) is done different than before.

An explaining error message about unbalanced parenthesis would be required.

Actions #3

Updated by Georg Ringer almost 4 years ago

  • Subject changed from TypoScript - PageTS not loaded if to TypoScript - PageTS not loaded if a bracket exists in the key
Actions #4

Updated by Christian Kuhn about 2 years ago

  • Status changed from Needs Feedback to New
Actions #5

Updated by Christian Kuhn almost 2 years ago

  • Status changed from New to Rejected

Round brackets '(' are NOT valid keys of an identifier, since they are used for multiline assignments. The docs says valid chars are a-z,A-Z,0-9, but in practice colon : is used, too.

foo (
multiline
value
)

Unsure what the old parser does here, but the new parser creates mykey identifier with value 'something' and "= label" is a comment.

This won't change. Don't use these chars in identifiers. Won't fix.

Actions #6

Updated by Christian Kuhn almost 2 years ago

Actions #7

Updated by Christian Hackl over 1 year ago

It was not about the fix, but that you get an error message at all or a corresponding entry is written in the error_log or something.

I don't know the parser now, but in general I would consider characters that are not allowed in certain places, but are still somehow taken into account as here, as a question of security, or not?

Actions

Also available in: Atom PDF