Issue Bug Closed

#100595Unable to call method "getPageType" of object "TYPO3\CMS\Backend\Routing\RouteResult".

Stefan Froemken 04/14/23, 13:04 updated 04/14/23, 19:43

Description

Hello,

we are just working on an Upgrade of TYPO3 11 to TYPO3 12.3

Like described here:

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.4/Deprecation-100405-PropertyTypoScriptFrontendController-type.html

we have modified old syntax to

[request.getPageArguments()?.getPageType() == 8918]
...
[global]

It works for FE, but somehow TypoScript will also be loaded in some backend modules like ExtensionManager. In that case “request.getPageArguments()” is of type RouteResult instead of PageArguments. RouteResult does not have a method “getPageType()”. That’s why ExtensionManager throws an Exception

Unable to call method "getPageType" of object "TYPO3\CMS\Backend\Routing\RouteResult".

Stefan

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.