Bug #87021

Using "getTSFE().beUserLogin == 1" as expression in an TypoScript condition leads to an error in the Symfony Expression Language

Added by Josef Glatz about 1 year ago. Updated 12 days ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
TypoScript
Start date:
2018-11-28
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
expressionlanguage
Complexity:
Is Regression:
Yes
Sprint Focus:
On Location Sprint

Description

TYPO3.CMS.Frontend.Configuration.TypoScript.ConditionMatching.ConditionMatcher": Unable to get a property on a non-object. - {"expression":"getTSFE().beUserLogin == 1","exception":"RuntimeException: Unable to get a property on a non-object. ...

Wed, 28 Nov 2018 07:49:42 +0100 [ERROR] request="4ab5589dfff70" component="TYPO3.CMS.Frontend.Configuration.TypoScript.ConditionMatching.ConditionMatcher": Unable to get a property on a non-object. - {"expression":"getTSFE().beUserLogin == 1","exception":"RuntimeException: Unable to get a property on a non-object. in \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/symfony\/expression-language\/Node\/GetAttrNode.php:73\nStack trace:\n#0 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/symfony\/expression-language\/Node\/BinaryNode.php(90): Symfony\\Component\\ExpressionLanguage\\Node\\GetAttrNode->evaluate(Array, Array)\n#1 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/symfony\/expression-language\/ExpressionLanguage.php(67): Symfony\\Component\\ExpressionLanguage\\Node\\BinaryNode->evaluate(Array, Array)\n#2 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/ExpressionLanguage\/Resolver.php(77): Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage->evaluate('getTSFE().beUse...', Array)\n#3 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Configuration\/TypoScript\/ConditionMatching\/AbstractConditionMatcher.php(233): TYPO3\\CMS\\Core\\ExpressionLanguage\\Resolver->evaluate('getTSFE().beUse...')\n#4 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Configuration\/TypoScript\/ConditionMatching\/AbstractConditionMatcher.php(208): TYPO3\\CMS\\Core\\Configuration\\TypoScript\\ConditionMatching\\AbstractConditionMatcher->evaluateExpression('getTSFE().beUse...')\n#5 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/TypoScript\/Parser\/TypoScriptParser.php(296): TYPO3\\CMS\\Core\\Configuration\\TypoScript\\ConditionMatching\\AbstractConditionMatcher->match('[getTSFE().beUs...')\n#6 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/TypoScript\/TemplateService.php(1219): TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser->parse('\\n[GLOBAL]\\n\\n[GLO...', Object(TYPO3\\CMS\\Frontend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher))\n#7 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/extbase\/Classes\/Configuration\/BackendConfigurationManager.php(73): TYPO3\\CMS\\Core\\TypoScript\\TemplateService->generateConfig()\n#8 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/extbase\/Classes\/Configuration\/AbstractConfigurationManager.php(215): TYPO3\\CMS\\Extbase\\Configuration\\BackendConfigurationManager->getTypoScriptSetup()\n#9 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/extbase\/Classes\/Configuration\/AbstractConfigurationManager.php(151): TYPO3\\CMS\\Extbase\\Configuration\\AbstractConfigurationManager->getExtbaseConfiguration()\n#10 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/extbase\/Classes\/Configuration\/ConfigurationManager.php(127): TYPO3\\CMS\\Extbase\\Configuration\\AbstractConfigurationManager->getConfiguration('Backend', NULL)\n#11 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/extbase\/Classes\/Utility\/LocalizationUtility.php(234): TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager->getConfiguration('Framework', 'Backend')\n#12 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/extbase\/Classes\/Utility\/LocalizationUtility.php(166): TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::loadTypoScriptLabels('Backend', '\/Volumes\/CS\/Pro...')\n#13 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/extbase\/Classes\/Utility\/LocalizationUtility.php(97): TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::initializeLocalization('\/Volumes\/CS\/Pro...', 'default', Array, 'Backend')\n#14 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/fluid\/Classes\/ViewHelpers\/TranslateViewHelper.php(156): TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate('moveElements', 'Backend', NULL, 'default', Array)\n#15 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/fluid\/Classes\/ViewHelpers\/TranslateViewHelper.php(130): TYPO3\\CMS\\Fluid\\ViewHelpers\\TranslateViewHelper::translate('LLL:EXT:core\/Re...', 'Backend', NULL, NULL, NULL)\n#16 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/Traits\/CompileWithRenderStatic.php(30): TYPO3\\CMS\\Fluid\\ViewHelpers\\TranslateViewHelper::renderStatic(Array, Object(Closure), Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#17 [internal function]: TYPO3\\CMS\\Fluid\\ViewHelpers\\TranslateViewHelper->render()\n#18 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/AbstractViewHelper.php(262): call_user_func(Array)\n#19 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/AbstractViewHelper.php(250): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractViewHelper->callRenderMethod()\n#20 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/ViewHelperInvoker.php(79): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractViewHelper->initializeArgumentsAndRender()\n#21 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/ViewHelperNode.php(153): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\ViewHelperInvoker->invoke(Object(TYPO3\\CMS\\Fluid\\ViewHelpers\\TranslateViewHelper), Array, Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#22 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/EscapingNode.php(43): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode->evaluate(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#23 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/AbstractNode.php(58): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\EscapingNode->evaluate(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#24 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/AbstractNode.php(45): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode->evaluateChildNode(Object(TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\EscapingNode), Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext), true)\n#25 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/AbstractViewHelper.php(304): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode->evaluateChildNodes(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#26 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/ViewHelpers\/ElseViewHelper.php(55): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractViewHelper->renderChildren()\n#27 [internal function]: TYPO3Fluid\\Fluid\\ViewHelpers\\ElseViewHelper->render()\n#28 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/AbstractViewHelper.php(262): call_user_func(Array)\n#29 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/AbstractViewHelper.php(250): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractViewHelper->callRenderMethod()\n#30 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/ViewHelperInvoker.php(79): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractViewHelper->initializeArgumentsAndRender()\n#31 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/ViewHelperNode.php(153): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\ViewHelperInvoker->invoke(Object(TYPO3Fluid\\Fluid\\ViewHelpers\\ElseViewHelper), Array, Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#32 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/AbstractConditionViewHelper.php(181): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode->evaluate(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#33 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/ViewHelpers\/IfViewHelper.php(96): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractConditionViewHelper->renderElseChild()\n#34 [internal function]: TYPO3Fluid\\Fluid\\ViewHelpers\\IfViewHelper->render()\n#35 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/AbstractViewHelper.php(262): call_user_func(Array)\n#36 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/AbstractViewHelper.php(250): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractViewHelper->callRenderMethod()\n#37 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/ViewHelperInvoker.php(79): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractViewHelper->initializeArgumentsAndRender()\n#38 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/ViewHelperNode.php(153): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\ViewHelperInvoker->invoke(Object(TYPO3Fluid\\Fluid\\ViewHelpers\\IfViewHelper), Array, Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#39 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/AbstractNode.php(58): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode->evaluate(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#40 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/AbstractNode.php(45): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode->evaluateChildNode(Object(TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode), Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext), true)\n#41 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/RootNode.php(25): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode->evaluateChildNodes(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#42 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/ParsingState.php(119): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode->evaluate(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#43 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/View\/AbstractTemplateView.php(329): TYPO3Fluid\\Fluid\\Core\\Parser\\ParsingState->render(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#44 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/ViewHelpers\/RenderViewHelper.php(141): TYPO3Fluid\\Fluid\\View\\AbstractTemplateView->renderPartial('Clipboard\/Copym...', NULL, Array, false)\n#45 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/Traits\/CompileWithRenderStatic.php(30): TYPO3Fluid\\Fluid\\ViewHelpers\\RenderViewHelper::renderStatic(Array, Object(Closure), Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#46 [internal function]: TYPO3Fluid\\Fluid\\ViewHelpers\\RenderViewHelper->render()\n#47 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/AbstractViewHelper.php(262): call_user_func(Array)\n#48 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/AbstractViewHelper.php(250): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractViewHelper->callRenderMethod()\n#49 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/ViewHelper\/ViewHelperInvoker.php(79): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractViewHelper->initializeArgumentsAndRender()\n#50 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/ViewHelperNode.php(153): TYPO3Fluid\\Fluid\\Core\\ViewHelper\\ViewHelperInvoker->invoke(Object(TYPO3\\CMS\\Fluid\\ViewHelpers\\RenderViewHelper), Array, Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#51 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/AbstractNode.php(58): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode->evaluate(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#52 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/AbstractNode.php(45): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode->evaluateChildNode(Object(TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode), Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext), true)\n#53 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/SyntaxTree\/RootNode.php(25): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\AbstractNode->evaluateChildNodes(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#54 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/Core\/Parser\/ParsingState.php(119): TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode->evaluate(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#55 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/vendor\/typo3fluid\/fluid\/src\/View\/AbstractTemplateView.php(186): TYPO3Fluid\\Fluid\\Core\\Parser\\ParsingState->render(Object(TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext))\n#56 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Clipboard\/Clipboard.php(362): TYPO3Fluid\\Fluid\\View\\AbstractTemplateView->render()\n#57 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/recordlist\/Classes\/Controller\/RecordListController.php(611): TYPO3\\CMS\\Backend\\Clipboard\\Clipboard->printClipboard()\n#58 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/recordlist\/Classes\/Controller\/RecordListController.php(665): TYPO3\\CMS\\Recordlist\\Controller\\RecordListController->main(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#59 [internal function]: TYPO3\\CMS\\Recordlist\\Controller\\RecordListController->mainAction(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#60 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Http\/RouteDispatcher.php(87): call_user_func_array(Array, Array)\n#61 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Http\/RequestHandler.php(73): TYPO3\\CMS\\Backend\\Http\\RouteDispatcher->dispatch(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(TYPO3\\CMS\\Core\\Http\\Response))\n#62 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Middleware\/SiteResolver.php(59): TYPO3\\CMS\\Backend\\Http\\RequestHandler->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#63 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\SiteResolver->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(TYPO3\\CMS\\Backend\\Http\\RequestHandler))\n#64 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Middleware\/AdditionalResponseHeaders.php(39): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#65 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\AdditionalResponseHeaders->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#66 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Middleware\/OutputCompression.php(45): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#67 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\OutputCompression->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#68 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Middleware\/LegacyBackendTemplateInitialization.php(42): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#69 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\LegacyBackendTemplateInitialization->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#70 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Middleware\/BackendUserAuthenticator.php(69): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#71 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\BackendUserAuthenticator->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#72 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Middleware\/BackendRouteInitialization.php(72): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#73 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\BackendRouteInitialization->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#74 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Middleware\/ForcedHttpsBackendRedirector.php(53): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#75 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\ForcedHttpsBackendRedirector->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#76 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Middleware\/LockedBackendGuard.php(71): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#77 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Backend\\Middleware\\LockedBackendGuard->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#78 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Middleware\/NormalizedParamsAttribute.php(58): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#79 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/MiddlewareDispatcher.php(138): TYPO3\\CMS\\Core\\Middleware\\NormalizedParamsAttribute->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#80 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/MiddlewareDispatcher.php(67): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#81 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/AbstractApplication.php(98): TYPO3\\CMS\\Core\\Http\\MiddlewareDispatcher->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#82 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/backend\/Classes\/Http\/Application.php(68): TYPO3\\CMS\\Core\\Http\\AbstractApplication->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#83 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/sysext\/core\/Classes\/Http\/AbstractApplication.php(110): TYPO3\\CMS\\Backend\\Http\\Application->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#84 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/index.php(24): TYPO3\\CMS\\Core\\Http\\AbstractApplication->run()\n#85 \/Volumes\/CS\/Projekte\/TYPO3\/TYPO3-Distribution\/TYPO3-Distribution\/app\/web\/typo3\/index.php(25): {closure}()\n#86 {main}"}

Related issues

Related to TYPO3 Core - Bug #86915: Symfony Expression TypoScript conditions fail at nested arrays Closed 2018-11-13
Related to TYPO3 Core - Bug #90078: getTSFE().type Condition Error Closed 2020-01-10
Duplicated by TYPO3 Core - Bug #87386: Correct ExpressionLanguage based TypoScript condition throws deprecation in TYPO3 backend Closed 2019-01-10
Duplicated by TYPO3 Core - Bug #89658: RuntimeException Unable to get a property on a non-object when parsing new Symfony ExpressionLanguage expressions Closed 2019-11-12

Associated revisions

Revision 65990a5b (diff)
Added by Georg Ringer 12 days ago

[BUGFIX] Handle missing TSFE gracefully in TS conditions

A condition like [getTSFE().id == 1] is evaluated in BE as well
and logged an error 'Unable to get a property on a non-object'.

This patch ensures that conditions based on getTSFE() are
treated gracefully and are evaluated to false.

Resolves: #87021
Releases: master, 9.5
Change-Id: If56a8b7bd66b9f7e66bdc8ce5f56c8df890cf655
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59129
Tested-by: TYPO3com <>
Tested-by: Markus Klein <>
Tested-by: Susanne Moog <>
Tested-by: Daniel Goerz <>
Reviewed-by: Markus Klein <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Daniel Goerz <>

Revision 92ed7870 (diff)
Added by Georg Ringer 12 days ago

[BUGFIX] Handle missing TSFE gracefully in TS conditions

A condition like [getTSFE().id == 1] is evaluated in BE as well
and logged an error 'Unable to get a property on a non-object'.

This patch ensures that conditions based on getTSFE() are
treated gracefully and are evaluated to false.

Resolves: #87021
Releases: master, 9.5
Change-Id: If56a8b7bd66b9f7e66bdc8ce5f56c8df890cf655
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62855
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Tested-by: Daniel Goerz <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Daniel Goerz <>

History

#1 Updated by Josef Glatz about 1 year ago

  • Description updated (diff)

#2 Updated by Josef Glatz about 1 year ago

  • Related to Bug #86915: Symfony Expression TypoScript conditions fail at nested arrays added

#3 Updated by Georg Ringer about 1 year ago

  • Status changed from New to Needs Feedback

don't get an exception currently, can you recheck?

#4 Updated by Josef Glatz about 1 year ago

Georg Ringer wrote:

don't get an exception currently, can you recheck?


Frontend: No exception, looks good

Backend: A request in the TypoScript Object Browser does trigger an error (take a look in the error log)

#5 Updated by Josef Glatz about 1 year ago

  • Status changed from Needs Feedback to Accepted

#6 Updated by Gerrit Code Review about 1 year ago

  • Status changed from Accepted to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59129

#7 Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59129

#8 Updated by Gerrit Code Review about 1 year ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59129

#9 Updated by Armin Vieweg about 1 year ago

A possible workaround would be:

[getTSFE() && getTSFE().beUserLogin == 1]

This worked for me.

#10 Updated by Armin Vieweg about 1 year ago

But then I get this deprecation message:

Thu, 13 Dec 2018 17:47:12 +0100 [NOTICE] request="dd56be5f86186" component="TYPO3.CMS.deprecations": Core: Error handler (FE): TYPO3 Deprecation Notice: Property $TSFE->beUserLogin is not in use anymore as this information is now stored within the backend.user aspect. in /var/www/html/public/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php line 5196

Which does not work, because "backend.user" is not available in frontend context!

#11 Updated by Gerrit Mohrmann about 1 year ago

The same with

[like(request.getNormalizedParams().getHttpHost(), "www.*")]

in cli context

#12 Updated by Robert Vock 12 months ago

I am using

[getTSFE() && getTSFE().isBackendUserLoggedIn() == 0]

This does work in frontend context and does not trigger a deprecation.

It's still a lot less readable than

[backend.user.isLoggedIn]

or the old

[globalVar = TSFE:beUserLogin = 1]

#13 Updated by Frank Naegler 4 months ago

The getTSFE() function returns the TypoScriptFrontendController and this class has no property beUserLogin
So, the exception is correct. Or did I miss anything here?

#14 Updated by Markus Klein 13 days ago

  • Related to Bug #90078: getTSFE().type Condition Error added

#15 Updated by Markus Klein 13 days ago

  • Duplicated by Bug #87386: Correct ExpressionLanguage based TypoScript condition throws deprecation in TYPO3 backend added

#16 Updated by Markus Klein 13 days ago

  • Duplicated by Bug #89658: RuntimeException Unable to get a property on a non-object when parsing new Symfony ExpressionLanguage expressions added

#17 Updated by Gerrit Code Review 13 days ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59129

#18 Updated by Gerrit Code Review 13 days ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59129

#19 Updated by Susanne Moog 12 days ago

  • Sprint Focus set to On Location Sprint

#20 Updated by Gerrit Code Review 12 days ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62855

#21 Updated by Georg Ringer 12 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#22 Updated by Gerrit Code Review 12 days ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62855

#23 Updated by Gerrit Code Review 12 days ago

Patch set 3 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62855

#24 Updated by Gerrit Code Review 12 days ago

Patch set 4 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62855

#25 Updated by Georg Ringer 12 days ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF