From 48fc01fa929a673f99e5408505102e7334326952 Mon Sep 17 00:00:00 2001 From: Susanne Moog Date: Mon, 9 Apr 2018 20:47:02 +0200 Subject: [PATCH] [BUGFIX] Do not call deprecated feedit initialize method Resolves: #84677 Releases: master Change-Id: I2d1887dd982e95e633755eed75f3bb0cdfe4d4ec Reviewed-on: https://review.typo3.org/56618 Reviewed-by: Wouter Wolters Reviewed-by: Benni Mack Tested-by: TYPO3com Tested-by: Benni Mack Reviewed-by: Oliver Hader Tested-by: Oliver Hader --- Classes/Middleware/FrontendEditInitiator.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Classes/Middleware/FrontendEditInitiator.php b/Classes/Middleware/FrontendEditInitiator.php index 96c7ede..29b8ade 100644 --- a/Classes/Middleware/FrontendEditInitiator.php +++ b/Classes/Middleware/FrontendEditInitiator.php @@ -21,6 +21,7 @@ use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\MiddlewareInterface; use Psr\Http\Server\RequestHandlerInterface; use TYPO3\CMS\Backend\FrontendBackendUserAuthentication; +use TYPO3\CMS\Core\FrontendEditing\FrontendEditingController; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; @@ -40,7 +41,7 @@ class FrontendEditInitiator implements MiddlewareInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { - if ($GLOBALS['BE_USER'] instanceof FrontendBackendUserAuthentication) { + if (isset($GLOBALS['BE_USER']) && $GLOBALS['BE_USER'] instanceof FrontendBackendUserAuthentication) { $config = $GLOBALS['BE_USER']->getTSConfigProp('admPanel'); $active = (int)$GLOBALS['TSFE']->displayEditIcons === 1 || (int)$GLOBALS['TSFE']->displayFieldEditIcons === 1; if ($active && isset($config['enable.'])) { @@ -56,6 +57,9 @@ class FrontendEditInitiator implements MiddlewareInterface $controllerClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController'][$controllerKey]; if ($controllerClass) { $GLOBALS['BE_USER']->frontendEdit = GeneralUtility::makeInstance($controllerClass); + if ($controllerClass instanceof FrontendEditingController) { + $GLOBALS['BE_USER']->frontendEdit->initConfigOptions(); + } } break; }