#89715Condition request.getNormalizedParams().getHttpHost() causes an error when cron runs schedular:run
Description
I have a condition in the TypoScript like this:
[like(request.getNormalizedParams().getHttpHost(), "*.domain.com")]
page.includeCSS.file99 = EXT:xskeleton/Resources/Public/Css/for-development-only.css
page.includeJSFooter.file99 = EXT:xskeleton/Resources/Public/Js/for-development-only.js
[end]
This works totally fine in the frontend but when the schedular runs via cron the condition causes an error in the log file:
Tue, 19 Nov 2019 12:58:09 +0100 [ERROR] request="3d81e8292386f" component="TYPO3.CMS.Frontend.Configuration.TypoScript.ConditionMatching.ConditionMatcher": Unable to get a property on a non-object. - {"expression":"like(request.getNormalizedParams().getHttpHost(), \"*.domain.com\")","exception":"RuntimeException: Unable to get a property on a non-object. in /var/www/html/vendor/symfony/expression-language/Node/GetAttrNode.php:83
The problem is there is no request created within the schedular job. Therefore it turns out I can’t use any of the conditions which based on a request. Isn’t it a weird behaviour. I would expect the the condition just returns a FALSE.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.