2
votes

The following combined typoscript conditions is working in TYPO3 9 but not with TYPO3 10 anymore:

[loginUser('*')] && [getTSFE() && getTSFE().page['uid'] == {$pid.login}]
    page.bodyTag = <body class="logged-in">
[global]

In TYPO3 10 I get this error:

Expression could not be parsed. - {"expression":"loginUser('*')] && [getTSFE() && getTSFE().page['uid'] == 20"}

How can I combine conditions in TYPO3 10?

1

1 Answers

1
votes

The combined TypoScript needs to be inside 1 set of brackets. So: [loginUser('*') && getTSFE() && getTSFE().page['uid'] == {$pid.login}].

The reason why it worked in TYPO3 9 is because the old conditions worked like [...] && [...] instead of [... && ...] and they even worked when combining the old syntax with the new symfony expressions. In TYPO3 10 the old conditions have been removed including the syntax, so it doesn't work like that anymore.