Issue Bug Closed

#38879TYPO3 is not defined, if inlineSettings are rendered without ExtJs

Helge Funk 07/11/12, 16:51 updated 10/02/18, 12:17

Description

The JavaScript object “TYPO3” is not defined, if inlineSettings (TYPO3.settings / TYPO3.lang) are rendered without ExtJ.

Reproduce: Add inline settings in pagerenderer without adding ExtJs…

Affects 4.5, 4.6, 4.7, 6.0

Index: t3lib/class.t3lib_pagerenderer.php
===================================================================
--- t3lib/class.t3lib_pagerenderer.php    (revision 501)
+++ t3lib/class.t3lib_pagerenderer.php    (working copy)
@@ -1889,6 +1889,7 @@
             }
         } else {
             if ($inlineSettings) {
+                $inlineSettings = 'if (typeof TYPO3 === "undefined") TYPO3 = {};' . CRLF . $inlineSettings;
                 $out .= $this->inlineJavascriptWrap[0] . $inlineSettings . $this->inlineJavascriptWrap[1];
             }
         }

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.