Project

General

Profile

Actions

Bug #103070

closed

After clearing System Cache TypoScript conditions are parsed before substituting constants

Added by Andreas Kokott 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2024-02-07
Due date:
% Done:

0%

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

Description

Immediately after system caches are cleared, an error is raised about the condition cannot be parsed.
The constants in the condition did not get substituted.
I did not notice any issues with the conditions in the Frontend.

#1 TYPO3\CMS\Core\Log\Logger->writeLog(TYPO3\CMS\Core\Log\LogRecord::class)
typo3_src-12.4.10/typo3/sysext/core/Classes/Log/Logger.php in Zeile 204

#2 TYPO3\CMS\Core\Log\Logger->log(3, 'Expression could not be parsed.', [expression => 'traverse(page, "uid") in [{$plugin.tx_cookieconsent.settings.url},{$plugin.tx_cookieconsent.settings.imprint}]'])
typo3_src-12.4.10/vendor/psr/log/src/LoggerTrait.php in Zeile 70

#3 TYPO3\CMS\Core\Log\Logger->error('Expression could not be parsed.', [expression => 'traverse(page, "uid") in [{$plugin.tx_cookieconsent.settings.url},{$plugin.tx_cookieconsent.settings.imprint}]'])
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Visitor/IncludeTreeConditionMatcherVisitor.php in Zeile 164

#4 TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeConditionMatcherVisitor->visitBeforeChildren(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\ConditionInclude::class, 4)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 55

#5 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\ConditionInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class], 4)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 62

#6 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\FileInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class], 3)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 62

#7 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeStaticFileDatabaseInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class], 2)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 62

#8 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\SysTemplateInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class], 1)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 62

#9 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\RootInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class], 0)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 49

#10 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverse(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\RootInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class])
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php in Zeile 287

#11 TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getTypoScriptSetup()
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php in Zeile 302

#12 TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getExtbaseConfiguration()
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php in Zeile 166

#13 TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getConfiguration(NULL, NULL)
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Configuration/ConfigurationManager.php in Zeile 143

#14 TYPO3\CMS\Extbase\Configuration\ConfigurationManager->getConfiguration('Framework')
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Configuration/ConfigurationManager.php in Zeile 163

#15 TYPO3\CMS\Extbase\Configuration\ConfigurationManager->isFeatureEnabled('ignoreAllEnableFieldsInBe')
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Persistence/Generic/Typo3QuerySettings.php in Zeile 77


Related issues 2 (0 open2 closed)

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

Actions
Related to TYPO3 Core - Bug #92528: TypoScript site constants not always populatedClosed2020-10-09

Actions
Actions #1

Updated by Christian Kuhn 3 months ago

  • Status changed from New to Needs Feedback

This looks fishy: It smells as if a custom middleware fires extbase early, which is problematic when that middleware is located wrong or does not take care of proper extbase bootstrap. Please provide full backtrace - this should allow us to see if this is really a core issue. Otherwise, maybe fixed by #92528?

Actions #2

Updated by Christian Kuhn 3 months ago

Actions #3

Updated by Andreas Kokott 3 months ago

Sorry the original Backtrace got truncated, found the cause.
Seems to be related to EXT:static_info_tables registering a datahandler Hook which injects extbase repositories.

#0 Brainworxx\Olfa\Log\FileWriter->writeLog(TYPO3\CMS\Core\Log\LogRecord::class)
typo3_src-12.4.10/typo3/sysext/core/Classes/Log/Logger.php in Zeile 234

#1 TYPO3\CMS\Core\Log\Logger->writeLog(TYPO3\CMS\Core\Log\LogRecord::class)
typo3_src-12.4.10/typo3/sysext/core/Classes/Log/Logger.php in Zeile 204

#2 TYPO3\CMS\Core\Log\Logger->log(3, 'Expression could not be parsed.', [expression => '{$siteFeedbackPid} != '' && {$siteFeedbackPid} in tree.rootLineIds'])
typo3_src-12.4.10/vendor/psr/log/src/LoggerTrait.php in Zeile 70

#3 TYPO3\CMS\Core\Log\Logger->error('Expression could not be parsed.', [expression => '{$siteFeedbackPid} != '' && {$siteFeedbackPid} in tree.rootLineIds'])
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Visitor/IncludeTreeConditionMatcherVisitor.php in Zeile 164

#4 TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeConditionMatcherVisitor->visitBeforeChildren(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\ConditionInclude::class, 3)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 55

#5 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\ConditionInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class], 3)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 62

#6 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AtImportInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class], 2)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 62

#7 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\SysTemplateInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class], 1)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 62

#8 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\RootInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class], 0)
typo3_src-12.4.10/typo3/sysext/core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php in Zeile 49

#9 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverse(TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\RootInclude::class, 2 => TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor::class])
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php in Zeile 287

#10 TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getTypoScriptSetup()
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php in Zeile 302

#11 TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getExtbaseConfiguration()
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php in Zeile 166

#12 TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getConfiguration(NULL, NULL)
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Configuration/ConfigurationManager.php in Zeile 143

#13 TYPO3\CMS\Extbase\Configuration\ConfigurationManager->getConfiguration('Framework')
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Configuration/ConfigurationManager.php in Zeile 163

#14 TYPO3\CMS\Extbase\Configuration\ConfigurationManager->isFeatureEnabled('ignoreAllEnableFieldsInBe')
typo3_src-12.4.10/typo3/sysext/extbase/Classes/Persistence/Generic/Typo3QuerySettings.php in Zeile 77

#15 TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings->__construct(TYPO3\CMS\Core\Context\Context::class, TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class)
typo3_src-12.4.10/typo3/sysext/core/Classes/Utility/GeneralUtility.php in Zeile 3017

#16 TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceForDi('TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings', TYPO3\CMS\Core\Context\Context::class, TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class)
upgrade-web/typo3temp/var/cache/code/di/DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19.php in Zeile 15396

#17 DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::{closure}(DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::class)
upgrade-web/typo3temp/var/cache/code/di/DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19.php in Zeile 15399

#18 DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::getTypo3QuerySettingsService(DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::class)
typo3_src-12.4.10/vendor/symfony/dependency-injection/Container.php in Zeile 231

#19 Symfony\Component\DependencyInjection\Container::make(DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::class, 'TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings', 1)
typo3_src-12.4.10/vendor/symfony/dependency-injection/Container.php in Zeile 211

#20 Symfony\Component\DependencyInjection\Container->get('TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings')
typo3_src-12.4.10/typo3/sysext/core/Classes/Utility/GeneralUtility.php in Zeile 2982

#21 TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings')
upgrade-web/typo3conf/ext/static_info_tables/Classes/Domain/Repository/AbstractEntityRepository.php in Zeile 87

#22 SJBR\StaticInfoTables\Domain\Repository\AbstractEntityRepository->initializeObject()
upgrade-web/typo3temp/var/cache/code/di/DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19.php in Zeile 11226

#23 DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::getTerritoryRepositoryService(DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::class)
upgrade-web/typo3temp/var/cache/code/di/DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19.php in Zeile 11145

#24 DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::getCountryRepositoryService(DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::class)
upgrade-web/typo3temp/var/cache/code/di/DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19.php in Zeile 11304

#25 DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::getProcessDataMapService(DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::class)
typo3_src-12.4.10/vendor/symfony/dependency-injection/Container.php in Zeile 231

#26 Symfony\Component\DependencyInjection\Container::make(DependencyInjectionContainer_d98107e1f42493b4e4809f0ba941abc78151ee19::class, 'SJBR\StaticInfoTables\Hook\Core\DataHandling\ProcessDataMap', 1)
typo3_src-12.4.10/vendor/symfony/dependency-injection/Container.php in Zeile 211

#27 Symfony\Component\DependencyInjection\Container->get('SJBR\StaticInfoTables\Hook\Core\DataHandling\ProcessDataMap')
typo3_src-12.4.10/typo3/sysext/core/Classes/Utility/GeneralUtility.php in Zeile 2982

#28 TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('SJBR\StaticInfoTables\Hook\Core\DataHandling\ProcessDataMap')
typo3_src-12.4.10/typo3/sysext/core/Classes/DataHandling/DataHandler.php in Zeile 838

Actions #4

Updated by Christian Kuhn 2 months ago

  • Related to Bug #92528: TypoScript site constants not always populated added
Actions #5

Updated by Christian Kuhn 2 months ago · Edited

  • Status changed from Needs Feedback to Closed

Ok, i assume {$siteFeedbackPid} is defined as constant of your 'first' site and is then used by some TS of the first page of that site. This issue has been fixed with #92528 in 12.4.11 which now fetches the matching site when extbase triggers this TS parser magic in BE.

Note it's structurally a bit fishy to have a DataHandler hook that triggers injection of extbase repositories which then triggers TS parsing. This creates quite a bit of overhead in DataHandler. I'd say it would be at least a good idea for static_info_tables to inject container instead, and $container->get() the repositories within the methods only if really needed, or to switch away from the extbase repository usage at this point entirely.

Also note it's a conceptual flaw in extbase that BE stuff depends on FE TS in the first place. Unfortunately, core did not yet find a solution to finally get rid of this.

Actions

Also available in: Atom PDF