[BUGFIX] Load t3editor in File Edit record again 79/42579/2
authorBenjamin Mack <benni@typo3.org>
Thu, 13 Aug 2015 13:54:22 +0000 (15:54 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 13 Aug 2015 13:58:32 +0000 (15:58 +0200)
Resolves: #67613
Releases: master
Change-Id: Icd3c64094a0c198b70017ba9298a64514481c85d
Reviewed-on: http://review.typo3.org/42579
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/t3editor/Classes/Hook/FileEditHook.php

index 2b8520b..6391757 100644 (file)
@@ -66,7 +66,9 @@ class FileEditHook {
         * @see \TYPO3\CMS\Backend\Template\DocumentTemplate::startPage
         */
        public function preStartPageHook($parameters, $documentTemplate) {
-               if (GeneralUtility::_GET('M') === 'file_edit') {
+               // @todo: this is a workaround. Ideally the document template holds the current request so we can match the route
+               // against the name of the route and not the GET parameter
+               if (GeneralUtility::_GET('route') === '/file/editcontent') {
                        $t3editor = $this->getT3editor();
                        $t3editor->getJavascriptCode($documentTemplate);
                        $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/T3editor/FileEdit');