[BUGFIX] Add page uid to rte module urls for correct TSconfig loading 56/52756/2
authorMarc Bastian Heinrichs <typo3@mbh-software.de>
Thu, 11 May 2017 08:48:38 +0000 (10:48 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 10 Oct 2017 09:05:22 +0000 (11:05 +0200)
Because of a missing page uid in rte module window iframe urls, like for
the BrowseLinks popup, the ConditionMatcher could not evaluate
conditions in INCLUDE_TYPOSCRIPT that rely on the page uid, like
PIDinRootline.

Resolves: #81190
Releases: 7.6
Change-Id: I7952b910d9caa50ce5ca1abd6bf7309ad80c60b1
Reviewed-on: https://review.typo3.org/52756
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/rtehtmlarea/Classes/Form/Element/RichTextElement.php
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Plugin/Plugin.js

index 1459db2..1733a0e 100644 (file)
@@ -659,6 +659,7 @@ class RichTextElement extends AbstractFormElement
         $jsArray[] = 'editornumber = ' . GeneralUtility::quoteJSvalue($this->domIdentifier) . ';';
         $jsArray[] = 'RTEarea[editornumber] = new Object();';
         $jsArray[] = 'RTEarea[editornumber].RTEtsConfigParams = "&RTEtsConfigParams=' . rawurlencode($this->RTEtsConfigParams()) . '";';
+        $jsArray[] = 'RTEarea[editornumber].uidOfPageRecord = "&id=' . (int)$this->pidOfPageRecord . '";';
         $jsArray[] = 'RTEarea[editornumber].number = editornumber;';
         $jsArray[] = 'RTEarea[editornumber].deleted = false;';
         $jsArray[] = 'RTEarea[editornumber].textAreaId = ' . GeneralUtility::quoteJSvalue($this->domIdentifier) . ';';
index 2d696c7..926ce94 100644 (file)
@@ -519,7 +519,7 @@ define(['TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent',
                 * @return      string          the url
                 */
                makeUrlFromModulePath: function (modulePath, parameters) {
-                       return modulePath + (modulePath.indexOf("?") === -1 ? "?" : "&") + this.editorConfiguration.RTEtsConfigParams + '&editorNo=' + this.editor.editorId + '&sys_language_content=' + this.editorConfiguration.sys_language_content + '&contentTypo3Language=' + this.editorConfiguration.typo3ContentLanguage + (parameters?parameters:'');
+                       return modulePath + (modulePath.indexOf("?") === -1 ? "?" : "&") + this.editorConfiguration.uidOfPageRecord + this.editorConfiguration.RTEtsConfigParams + '&editorNo=' + this.editor.editorId + '&sys_language_content=' + this.editorConfiguration.sys_language_content + '&contentTypo3Language=' + this.editorConfiguration.typo3ContentLanguage + (parameters?parameters:'');
                },
 
                /**