Bug #38879
closedTYPO3 is not defined, if inlineSettings are rendered without ExtJs
100%
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]; } }
Updated by Ernesto Baschny over 12 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
4.5.18) - TYPO3 Version changed from 4.7 to 4.5
Thanks for reporting. Do you have some code snippet (extension?) where this problem can be reproduced easily? Thanks!
Updated by Gerrit Code Review over 12 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12872
Updated by Helge Funk over 12 years ago
/** @var $pageRenderer t3lib_PageRenderer */
$pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
$settings = array('foo' => 'bar');
$pageRenderer->addInlineSettingArray('FooBar', $settings);
Add this code in a cached plugin... for example a simple extbase extension.
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/12872
Updated by Gerrit Code Review over 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/12872
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/20392
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/20393
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/20392
Updated by Benni Mack over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 23187ddd8e23a78349291baad45f54df2bbc0e1c.