Project

General

Profile

Actions

Bug #103364

open

Site config settings can't be used to override constants anymore

Added by Philipp Kitzberger 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2024-03-11
Due date:
% Done:

0%

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

Description

Before TYPO3 12 it was possible to have recursive constants, which made it possible to set TS constants to values defined in the site config settings.

I get that the (undocumented) 10-step-recursion-resolving had to go. So no argument with that. But I'd like to find a solution for the evident drawback I'm facing now.

As soon as I include an extensions TypoScript (that is constants+setup, with constants usually set to empty values), it's not possible to override those constants with "site constants" anymore.

A workaround could be to override those parts of the setup (where the constants are being read) and change the name of the constants! Since variables are often being used in multiple parts of the setup stack that cannot be the solution.

Take this (randomly chosen) snippet from EXT:powermail's TypoScript setup:

plugin.tx_powermail.settings.setup.main.pid = {$plugin.tx_powermail.settings.main.pid}

In order to override that setting I would have to change the TypoScript setup to this e.g.
plugin.tx_powermail.settings.setup.main.pid = {$plugin.tx_powermail.settings.main.pid_override_from_site}

And add this new constant to the site config:
settings:
  plugin:
    tx_powermail:
      setup:
        main:
          pid_override_from_site_config: 123

Here's a screenshot of how the constant stack is being put together:

With TYPO3 11 one simply had to set the extension's constant to the custom constant (and it's been resolves correctly) while the extension's setup could remain untouched.

plugin.tx_powermail.settings.main.pid = {$plugin.tx_powermail.settings.main.pid_override_from_site}


Files


Related issues 1 (0 open1 closed)

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

Actions
Actions

Also available in: Atom PDF