Actions
Bug #91654
closedMissing request.getNormalizedParams() in CLI context
Start date:
2020-06-16
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Using the request
condition for comparing the HTTP host fails in CLI context.
Setup:
[request.getNormalizedParams().getHttpHost() == '9lts.ddev.site'] page.10 = TEXT page.10.value = Hello World [global]
Executing a console command like /var/www/html/bin/typo3cms extension:activate tika
results in this error:
TYPO3 [ERROR] request="24a8a0f11c56c" component="TYPO3.CMS.Frontend.Configuration.TypoScript.ConditionMatching.ConditionMatcher": Unable to get a property on a non-object. - {"expression":"request.getNormalizedParams().getHttpHost() == '9lts.ddev.site'","exception":"RuntimeException: Unable to get a property on a non-object. in \/var\/www\/html\/vendor\/symfony\/expression-language\/Node\/GetAttrNode.php:83
We're using TYPO3 CMS 9.5.18 (haven't seen a fix in 9.5.19).
According to documentation the `request` condition should work in all contexts. Or does that not include CLI?
Setting it to [request.getNormalizedParams() || request.getNormalizedParams().getHttpHost() == '9lts.ddev.site']
resolves the error, so I believe getNormalizedParams()
is null.
Actions