From e4bb862ed4805832959fab8dffacb4f62851466c Mon Sep 17 00:00:00 2001 From: Christian Toffolo Date: Wed, 13 Sep 2023 11:38:49 +0200 Subject: [PATCH] [TASK] Remove obsolete ContentObjectRenderer Xclass (#722) The bug is now fixed in TYPO3 11.5.31 --- .../ContentObject/ContentObjectRenderer.php | 69 ------------------- ext_localconf.php | 5 -- 2 files changed, 74 deletions(-) delete mode 100644 Classes/Xclass/ContentObject/ContentObjectRenderer.php diff --git a/Classes/Xclass/ContentObject/ContentObjectRenderer.php b/Classes/Xclass/ContentObject/ContentObjectRenderer.php deleted file mode 100644 index 4d33d3bf..00000000 --- a/Classes/Xclass/ContentObject/ContentObjectRenderer.php +++ /dev/null @@ -1,69 +0,0 @@ -getTypoScriptFrontendController()->isBackendUserLoggedIn()) { - return $content; - } - if (!$this->getTypoScriptFrontendController()->displayFieldEditIcons) { - return $content; - } - if (!$currentRecord) { - $currentRecord = $this->currentRecord; - } - if (empty($dataArray)) { - $dataArray = $this->data; - } - // Check incoming params: - [$currentRecordTable, $currentRecordUID] = explode(':', $currentRecord); - [$fieldList, $table] = array_reverse(GeneralUtility::trimExplode(':', $params, true)); - // Reverse the array because table is optional - if (!$table) { - $table = $currentRecordTable; - } elseif ($table != $currentRecordTable) { - // If the table is set as the first parameter, and does not match the table of the current record, then just return. - return $content; - } - - $editUid = $dataArray['_LOCALIZED_UID'] ?? $currentRecordUID; - // Edit icons imply that the editing action is generally allowed, assuming page and content element permissions permit it. - if (!array_key_exists('allow', $conf)) { - $conf['allow'] = 'edit'; - } - if ($table && $this->getFrontendBackendUser()->allowedToEdit($table, $dataArray, $conf, true) && $fieldList && $this->getFrontendBackendUser()->allowedToEditLanguage($table, $dataArray)) { - $editClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit']; - if ($editClass) { - trigger_error('Hook "typo3/classes/class.frontendedit.php" is deprecated together with stdWrap.editIcons and will be removed in TYPO3 12.0.', E_USER_DEPRECATED); - $edit = GeneralUtility::makeInstance($editClass); - $content = $edit->editIcons($content, $params, $conf, $currentRecord, $dataArray, $addUrlParamStr, $table, $editUid, $fieldList); - } - } - return $content; - } -} diff --git a/ext_localconf.php b/ext_localconf.php index ae77cd34..ff44ecf2 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -25,11 +25,6 @@ ] ]; - // XCLass - $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class] = [ - 'className' => TYPO3\CMS\FrontendEditing\Xclass\ContentObject\ContentObjectRenderer::class - ]; - // Add RTE presets for frontend use $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['bronly'] = 'EXT:frontend_editing/Configuration/RTE/BrOnly.yaml'; $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['listonly'] = 'EXT:frontend_editing/Configuration/RTE/ListOnly.yaml';