Issue Bug Closed

#99795PHP Warning: Undefined property: TYPO3\\CMS\\Beuser\\Domain\\Model\\BackendUser::$workspace in /typo3_src-11.5.22/web/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php line 709

Thomas Hohn 02/02/23, 07:28 updated 02/08/23, 16:04

Description

It seems that ExtendedTemplateService has the following a reference to $GLOBALS[‘BE_USER’]->workspace):

 $queryBuilder->getRestrictions()
            ->removeAll()
            ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
            ->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, $GLOBALS['BE_USER']->workspace));

This should be replaced with

$this->context->getAspect('workspace')->get('id)

Reviews 1