Issue Bug Closed

#105191TypoScript condition with missing traverse breaks log module

Lina Wolf 10/04/24, 05:59 updated 12/02/25, 14:32

Description

After updating my TYPO3 installation from TYPO3 v 11.5 to 12.4 I get the following error in trying to open the log backend module:

(1/1) RuntimeException
Unable to get property "type" of non-object "getTSFE()".

in /var/www/html/vendor/symfony/expression-language/Node/GetAttrNode.php line 86

Related to:

https://forge.typo3.org/issues/100047

This was due to having a TypoScript condition without a traverse:

Before:

[getTSFE().type == 1618224993]
    plugin.tx_dpnglossary {
        view.templateRootPaths.10 = EXT:wco_sitepackage_forschung/Resources/Private/Extensions/DpnGlossary/Templates/Ajax
    }
[global]

Fixing the condition resolves the problem:

[traverse(getTSFE(), 'type') == 1618224993]
    plugin.tx_dpnglossary {
        view.templateRootPaths.10 = EXT:wco_sitepackage_forschung/Resources/Private/Extensions/DpnGlossary/Templates/Ajax
    }
[global]

However I think it would be good to add better error handling for conditions and to break with a more meaningful error message and a custom error code where we can add documentation about this error.

Reviews 2