powermail icon indicating copy to clipboard operation
powermail copied to clipboard

Breaking change concerning SessionViewHelper

Open DavidBruchmann opened this issue 4 years ago • 0 comments

TYPO3 9.4 introduced a breaking change in the SessionViewHelper, which also can be seen in the extension-checker in the installtool. https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.4/Deprecation-86002-TSFEConstructorWithNo_cacheArgument.html?highlight=tsfe%20constructor%20no_cache%20argument

The concerned code is this, the change is already "repaired" with comment:

        $pageArguments = GeneralUtility::makeInstance(PageArguments::class, 1, 0, []);
        $nullFrontend = GeneralUtility::makeInstance(NullFrontend::class, 'pages');
        $cacheManager = GeneralUtility::makeInstance(CacheManager::class);
        try {
            $cacheManager->registerCache($nullFrontend);
        } catch (\Exception $exception) {
            unset($exception);
        }
        $GLOBALS['TSFE'] = new TypoScriptFrontendController(
            GeneralUtility::makeInstance(Context::class),
            $site,
            $siteLanguage,
            // Deprecation: #86002 - TSFE constructor with no_cache argument
            null // $pageArguments
        );

Probably the first line above is still required to handle some cache, but it has to be called different then.

Even my change is at least not triggering an error-message in TYPO3 Version 10, it just ignores $pageArguments and also the description in the above linked deprecation-message is different to the description of the breaking change which can be found here: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.0/Breaking-88540-ChangedRequestWorkflowForFrontendRequests.html . As I never verified the code deeper I don't know about the correct way how to handle the problem.

I remarked the issue when I installed several extensions, somehow in the backend things never worked like expected anymore.

DavidBruchmann avatar May 22 '20 20:05 DavidBruchmann