Issue Bug Closed

#109526Accessing site settings in TSconfig is no longer possible

Felix Nagel 04/09/26, 08:22 updated 04/09/26, 12:23

Description

In TYPO3 14.0 it was possible to configure TSconfig by using site settings. Since TYPO3 14.1.0 (and in 14.2.0) this functionality does no longer work.

Code examples

This worked in TYPO3 14.0

[siteSetting("plugin.foobar.hideRelations", true) == false]
    mod.web_list.table.tx_foobar_table.hideTable = 1
[END]

This does not work at all:

[traverse(site('configuration'), 'plugin.foobar.hideRelations') == 1]
    mod.web_list.table.tx_foobar_table.hideTable = 1
[END]

*Why I want to do this*
I’ve been using Extension Manager settings in order to control TSconfig via “ExtensionManagementUtility::addPageTSConfig()” in the localconf.php. As “addPageTSConfig()” is no longer available, I switched to site settings to control TSconfig directly in the TSconfig files.

References

Reviews 0

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

History 5

  1. Felix Nagel commented 04/09/26, 08:23

    It seems, the issue is not only limited to TSconfig but TypoScript in general.
    See here: https://github.com/benjaminkott/bootstrap_package/issues/1593

  2. Garvin Hicking commented and changed category status New Needs Feedback 04/09/26, 11:23

    Are you using a settings.definitions.yaml file for these? If not, some settings are not properly exposed/evaluated.

  3. Felix Nagel commented 04/09/26, 11:54

    Thanks Garvin for the quick response!

    In the meantime Anton Danilov pointed out how to use the condition the correct way:

    [traverse(site('configuration'), 'settings/plugin/foobar/features/hideRelations') == true]
        mod.web_list.table.tx_foobar_table.hideTable = 1
    [END]

    This works in v14.2.0 without issues. I think this issue can be closed, sorry for the hassle.

  4. Garvin Hicking commented and changed status Needs Feedback Closed 04/09/26, 12:17

    Awesome, thats great! Thanks for letting me know – otherwise I would’ve had to postpone investigation to next week. :)

    Does this maybe also help in the bootstrap issue you linked? I only skimmed through it.

  5. Felix Nagel commented 04/09/26, 12:23

    I just added an answer for the bootstrap package issue with my findings. Hopefully that helps there too :-)