Issue Bug Closed

#87186Missing namespace for TypoScriptFrontendController in CObjectViewHelper

David Bruchmann 12/17/18, 13:53 updated 05/07/19, 12:15

Description

In the CObjectViewHelper is this function:

    /**
     * @return ContentObjectRenderer
     */
    protected static function getContentObjectRenderer()
    {
        return GeneralUtility::makeInstance(
            ContentObjectRenderer::class,
            $GLOBALS['TSFE'] ?? GeneralUtility::makeInstance(TypoScriptFrontendController::class, null, 0, 0)
        );
    }

Here TypoScriptFrontendController has no namespace and that throws an error.

Adding “use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;” above the class solves the issue;

Version: 9.5.3;

Reviews 2