From 71125625092bfd0b2d835f9c09032dbc5df21312 Mon Sep 17 00:00:00 2001 From: Benni Mack <benni@typo3.org> Date: Sat, 1 Oct 2022 20:29:00 +0200 Subject: [PATCH] [TASK] Remove leftover requireJS implementation of CKEditor CKEditor does not use RequireJS anymore since https://review.typo3.org/c/Packages/TYPO3.CMS/+/72733 regardless of any upgrade strategy, this code can be removed Resolves: #98495 Releases: main Change-Id: I92e6ebdfef7cb97ee00a1840080db95d9032495d Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75935 Tested-by: Georg Ringer <georg.ringer@gmail.com> Tested-by: core-ci <typo3@b13.com> Tested-by: Benjamin Franzke <bfr@qbus.de> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Benjamin Franzke <bfr@qbus.de> --- .../Hook/PageRendererRenderPreProcess.php | 46 ------------------- typo3/sysext/rte_ckeditor/ext_localconf.php | 5 -- 2 files changed, 51 deletions(-) delete mode 100644 typo3/sysext/rte_ckeditor/Classes/Hook/PageRendererRenderPreProcess.php diff --git a/typo3/sysext/rte_ckeditor/Classes/Hook/PageRendererRenderPreProcess.php b/typo3/sysext/rte_ckeditor/Classes/Hook/PageRendererRenderPreProcess.php deleted file mode 100644 index d178bd227654..000000000000 --- a/typo3/sysext/rte_ckeditor/Classes/Hook/PageRendererRenderPreProcess.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\RteCKEditor\Hook; - -use TYPO3\CMS\Core\Page\PageRenderer; -use TYPO3\CMS\Core\Utility\PathUtility; - -/** - * PageRenderer hook to add require js configuration for backend calls - * - * @internal This is a specific hook implementation and is not considered part of the Public TYPO3 API. - */ -final class PageRendererRenderPreProcess -{ - public function addRequireJsConfiguration(array $params, PageRenderer $pageRenderer): void - { - // @todo: Add an event to PageRenderer for registration of RequireJS configuration, see #93236 - if ($pageRenderer->getApplicationType() === 'BE') { - // @todo: Unused in TYPO3 core, but kept for requirejs compatibility in backend modules. - // Remove/deprecate when requirejs is deprecated. - $pageRenderer->addRequireJsConfiguration([ - 'shim' => [ - 'ckeditor' => ['exports' => 'CKEDITOR'], - ], - 'paths' => [ - 'ckeditor' => PathUtility::getPublicResourceWebPath('EXT:rte_ckeditor/Resources/Public/JavaScript/Contrib/') . 'ckeditor', - ], - ]); - } - } -} diff --git a/typo3/sysext/rte_ckeditor/ext_localconf.php b/typo3/sysext/rte_ckeditor/ext_localconf.php index 0cc554d261b1..8ceb1fa5c746 100644 --- a/typo3/sysext/rte_ckeditor/ext_localconf.php +++ b/typo3/sysext/rte_ckeditor/ext_localconf.php @@ -3,7 +3,6 @@ declare(strict_types=1); use TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver; -use TYPO3\CMS\RteCKEditor\Hook\PageRendererRenderPreProcess; defined('TYPO3') or die(); @@ -14,10 +13,6 @@ $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeResolver'][1480314091] = [ 'class' => RichTextNodeResolver::class, ]; -// Hook to add rte_ckeditor requirejs config to PageRenderer in backend -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'][] = - PageRendererRenderPreProcess::class . '->addRequireJsConfiguration'; - // Register the presets if (empty($GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'])) { $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:rte_ckeditor/Configuration/RTE/Default.yaml'; -- GitLab