Issue Bug Closed

#106435Conditions using `tree` may fail in TSconfig

Albrecht Köhnlein 03/26/25, 09:48 updated 04/24/26, 04:49

Description

Hi everybody,

I am using `tree` in conditions inside TSconfig as the documentation mentions it: https://docs.typo3.org/m/typo3/reference-typoscript/13.4/en-us/UsingSettingTSconfig/Conditions.html#tree-rootlineids

It works in most cases, but I realized that it fails and writes an error log entry, when I create a translation of a sys_file_metadata record. In this case, the expression variable `tree` is not set.

This example condition:

[4 in tree.rootLineIds]

leads to this esample error:

Variable "tree" is not valid around position 6 for expression `4 in tree.rootLineIds`.

It’s even the same error if I try to introduce a simple null-coalescing operator.

Variable "tree" is not valid around position 7 for expression `4 in (tree?.rootLineIds ?? [])`.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.