Bug #92120

Condition tree.rootLineIds does not work in User TSconfig

Added by Tobias Schmidt about 1 year ago. Updated about 2 months ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


In TYPO3 8 I've been setting the following default User TSconfig in ext_localconf.php via ExtensionManagementUtility::addUserTSConfig:

[PIDinRootline = 123]
    options.defaultUploadFolder = 1:myuploads/mywebsite1/
[PIDinRootline = 456,789]
    options.defaultUploadFolder = 1:myuploads/mywebsite2/

In TYPO3 10 I'm now trying to use the new condition syntax based on symfony expression language without success:

[123 in tree.rootLineIds]
    options.defaultUploadFolder = 1:myuploads/mywebsite1/
[456 in tree.rootLineIds || 789 in tree.rootLineIds]
    options.defaultUploadFolder = 1:myuploads/mywebsite2/

Using a condition like [page["uid"] == 124] for a single page works fine but I cannot manage to make tree.rootLineIds work. I noticed there a few bug reports regarding conditions and User TSconfig but none of them seems to be related to tree.rootLineIds.


Updated by Tobias Schmidt 12 months ago

  • Category set to TypoScript

Updated by Daniel Haupt 4 months ago

I can confirm this behavior!

Additionally, the User TSconfig is cached. Therefore, I guess, the condition logic is not evaluated switching pages.

Currently, the best way to change the defaultUploadFolder seems to be using this hook (eg. used by beechit/default_upload_folder).

I would appreciate a solution within the core (either by using TS conditions or by introducing a new page TSconfig option). This does not seem to be easy though.


Updated by Bernhard Eckl about 2 months ago

Same problem here. Hundreds of files are now in the wrong place since I made the update. Can somebody fix it?

Also available in: Atom PDF