Issue Bug Closed

#102357PageTsConfig: site settings / constants are not substituted in FormEngine

Moritz Ngo 11/09/23, 11:06 updated 05/26/24, 07:51

Description

When using Site settings as constants in PageTsConfig conditions, the actual value is not being substituted.

How to reproduce:

  1. Add SiteSettings (config/sites/<siteidentifier>/settings.yaml:</siteidentifier>
foo:
    bar: 1234
  1. Add PageTsConfig:
TCEFORM.test = {$foo.bar}
[{$foo.bar} == 1234]
    TCEFORM.test2 = 42
[GLOBAL]
  1. Open any record (e.g. page properties via Page module)

Now you’ll find the following error message in the TYPO3 Log:

Thu, 09 Nov 2023 11:59:07 +0100 [ERROR] request="af66caedbce8e" component="TYPO3.CMS.Core.TypoScript.IncludeTree.Visitor.IncludeTreeConditionMatcherVisitor": Expression could not be parsed. - {"expression":"{$foo.bar} == 1234"}

When Debugging PageTsConfig via the appropriate Module, the site settings / constants are getting substituted properly, thus suggesting it’ll work

Reviews 0

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