[BUGFIX] Page module Quickedit: wizards are broken 10/33910/3
authorBenjamin Mack <benni@typo3.org>
Sat, 8 Nov 2014 18:32:49 +0000 (19:32 +0100)
committerBenjamin Mack <benni@typo3.org>
Thu, 13 Nov 2014 15:43:26 +0000 (16:43 +0100)
When using Quickedit mode of Page module, the header link and the RTE
wizards are broken.
Backpath is added twice to the wizard urls.

Releases: master, 6.2
Resolves: #60958
Change-Id: I9ad470f9b7ffd4b74a91e02c4be2615723e79fd3
Change-Id: If2d1a620a6b924521c458c2b9a53c9e79aa1c819
Reviewed-on: http://review.typo3.org/33910
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Form/FormEngine.php

index 0068945..567ed46 100644 (file)
@@ -4554,7 +4554,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                                                        if (isset($wConf['module']['urlParameters']) && is_array($wConf['module']['urlParameters'])) {
                                                                                $urlParameters = $wConf['module']['urlParameters'];
                                                                        }
-                                                                       $wScript = BackendUtility::getModuleUrl($wConf['module']['name'], $urlParameters);
+                                                                       $wScript = BackendUtility::getModuleUrl($wConf['module']['name'], $urlParameters, $this->backPath);
                                                                } elseif (isset($wConf['script'])) {
                                                                        GeneralUtility::deprecationLog(
                                                                                'The way registering a wizard in TCA has changed in 6.2. '
@@ -4564,7 +4564,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                                                        if (substr($wConf['script'], 0, 4) === 'EXT:') {
                                                                                $wScript = GeneralUtility::getFileAbsFileName($wConf['script']);
                                                                                if ($wScript) {
-                                                                                       $wScript = '../' . PathUtility::stripPathSitePrefix($wScript);
+                                                                                       $wScript = $this->backPath . '../' . PathUtility::stripPathSitePrefix($wScript);
                                                                                } else {
                                                                                        // Illeagal configuration, fail silently
                                                                                        break;
@@ -4594,7 +4594,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                                                                                array('', 'wizard_element_browser', 'wizard_backend_layout'),
                                                                                                $parsedWizardUrl['path']
                                                                                        );
-                                                                                       $wScript = BackendUtility::getModuleUrl($moduleName, $urlParameters);
+                                                                                       $wScript = BackendUtility::getModuleUrl($moduleName, $urlParameters, $this->backPath);
                                                                                        unset($moduleName, $urlParameters, $parsedWizardUrl);
                                                                                } else {
                                                                                        $wScript = $wConf['script'];
@@ -4605,7 +4605,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                                                        break;
                                                                }
 
-                                                               $url = $this->backPath . $wScript . (strstr($wScript, '?') ? '' : '?');
+                                                               $url = ($wScript ?: $this->backPath) . (strstr($wScript, '?') ? '' : '?');
                                                                // If "script" type, create the links around the icon:
                                                                if ((string) $wConf['type'] === 'script') {
                                                                        $aUrl = $url . GeneralUtility::implodeArrayForUrl('', array('P' => $params));