Project

General

Profile

Bug #103364

Updated by Philipp Kitzberger 2 months ago

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":https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-97816-TypoScriptSyntaxChanges.html?highlight=nested%20constants#streamlined-constants-usage. 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 EXT:news' TypoScript setup: 
 <pre> 
 plugin.tx_powermail.settings.setup.main.pid plugin.tx_news.settings.opengraph.site_name = {$plugin.tx_powermail.settings.main.pid} {$plugin.tx_news.opengraph.site_name} 
 </pre> 
 In order to override that setting site_name I would have to change the TypoScript setup to this e.g. setup: 
 <pre> 
 plugin.tx_powermail.settings.setup.main.pid plugin.tx_news.settings.opengraph.site_name = {$plugin.tx_powermail.settings.main.pid_override_from_site} {$plugin.tx_news.opengraph.site_name_override_from_site_config} 
 </pre> 
 And add this new constant to the site config: 
 <pre> 
 settings: 
   plugin: 
     tx_powermail: tx_news: 
       setup: opengraph: 
         main: 
           pid_override_from_site_config: 123 site_name_override_from_site_config: 'my site name' 
 </pre> 

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

 !Bildschirmfoto%20vom%202024-03-11%2018-36-54.png! 

Back