2010-06-08 Steffen Kamper <info@sk-typo3.de>
+ * Fixed bug #14555: early thrown debug messages are not visible (BE only) (Thanks to Stefan Galinski)
* Fixed bug #14628: Open t3lib_db for own instance
* Follow-up to bug #8305: SQL debug output is not shown in the Backend
* Fixed bug #14618: Bug: Add debug feature to Ext Direct (Thanks to Fabien Udriot)
if ($header !== '') {
$tabHeader = htmlspecialchars($header);
} else {
- $tabHeader = 'Debug';
+ $tabHeader = 'Debug';
}
if (is_object($var)) {
}
$script = '
- var TYPO3ViewportInstance = null;
- var debugMessage = "' . $debug . '";
- var header = "' . $tabHeader . '";
- var group = "' . $group . '";
-
- if (top && top.TYPO3 && typeof top.TYPO3.Backend === "object") {
- TYPO3ViewportInstance = top.TYPO3.Backend;
- } else if (typeof TYPO3 === "object" && typeof TYPO3.Backend === "object") {
- TYPO3ViewportInstance = TYPO3.Backend;
- }
+ (function debug() {
+ var debugMessage = "' . $debug . '";
+ var header = "' . $tabHeader . '";
+ var group = "' . $group . '";
+
+ if (typeof Ext !== "object" && (top && typeof top.Ext !== "object")) {
+ document.write(debugMessage);
+ return;
+ }
- if (TYPO3ViewportInstance !== null) {
- TYPO3ViewportInstance.DebugConsole.addTab(debugMessage, header, group);
- } else {
- document.write(debugMessage);
- }
+ if (top && typeof Ext !== "object") {
+ Ext = top.Ext;
+ }
+
+ Ext.onReady(function() {
+ var TYPO3ViewportInstance = null;
+
+ if (top && top.TYPO3 && typeof top.TYPO3.Backend === "object") {
+ TYPO3ViewportInstance = top.TYPO3.Backend;
+ } else if (typeof TYPO3 === "object" && typeof TYPO3.Backend === "object") {
+ TYPO3ViewportInstance = TYPO3.Backend;
+ }
+
+ if (TYPO3ViewportInstance !== null) {
+ TYPO3ViewportInstance.DebugConsole.addTab(debugMessage, header, group);
+ } else {
+ document.write(debugMessage);
+ }
+ });
+ })();
';
echo self::wrapJS($script);
} else {