Bug #102357
closedPageTsConfig: site settings / constants are not substituted in FormEngine
0%
Description
When using Site settings as constants in PageTsConfig conditions, the actual value is not being substituted.
How to reproduce:
- Add SiteSettings (config/sites/<siteidentifier>/settings.yaml:
foo: bar: 1234
- Add PageTsConfig:
TCEFORM.test = {$foo.bar} [{$foo.bar} == 1234] TCEFORM.test2 = 42 [GLOBAL]
- 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
Updated by Nikita Hovratov about 1 year ago
- Related to Bug #92528: TypoScript site constants not always populated added
Updated by Nikita Hovratov about 1 year ago
- Related to Bug #102452: TypoScript constants from site settings are not substituted in Backend Extbase Modules added
Updated by Christian Kuhn about 1 year ago
· Edited
- Status changed from New to Needs Feedback
Hey.
Is this still an issue with current v12 releases?
I tried to reproduce the issue in v12 and v13, and it works for me. I added as pageTsConfig:
TCEFORM.test1 = something TCEFORM.test2 = {$site.foo} [{$site.foo} == 22656] TCEFORM.test3 = 42 [GLOBAL]
and then to my site settings.yaml the page is located in:
site: foo: 22656
When I open the page with that TS, or a record on this page, log stays empty. When I set a break point in FormEngine somewhere after the data array has been calculated (for instance in render() of InputTextElement, then $this->date['pageTsConfig'] contains all three test keys and test3 is 42 as expected.
I'd thus claim that site setting substitution works as expected in FormEngine?!
Note there is a bug with extbase BE modules that triggers this log entry, see #102452 for details. Maybe you confused this in your tests?
Updated by Christian Kuhn about 1 year ago
- Related to Feature #97816: New TypoScript parser added
Updated by Christian Kuhn about 1 year ago
- Related to Feature #91080: Populate site settings to TypoScript constants added
Updated by Christian Kuhn 9 months ago
- Status changed from Needs Feedback to Closed
closing due to lack of further feedback and we think it works.