Fixed bug #17502: ExtDirect Exception: "Error parsing json response: null"
authorSteffen Kamper <info@sk-typo3.de>
Mon, 7 Feb 2011 13:39:27 +0000 (13:39 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Mon, 7 Feb 2011 13:39:27 +0000 (13:39 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-5@10409 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_pagerenderer.php

index 65d4160..63dbc50 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2011-02-07 Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #17502: ExtDirect Exception: "Error parsing json response: null"
        * Fixed bug #17500: Improve error handling in ExtDirect router (Thanks to Helmut Hummel)
 
 2011-02-07  Ernesto Baschny  <ernst@cron-it.de>
index 28bf3b6..2cdd6ee 100644 (file)
@@ -1005,18 +1005,32 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                        );
                                } else {
                                        var backtrace = "";
-                                       if (event.where) {
+                                       if (event.code === "parse") {
+                                               extDirectDebug(
+                                                       "<p>" + event.xhr.responseText + "<\/p>",
+                                                       event.type,
+                                                       "ExtDirect - Exception"
+                                               );
+                                       } else if (event.code === "router") {
+                                               TYPO3.Flashmessage.display(
+                                                       TYPO3.Severity.error,
+                                                       event.code,
+                                                       event.message,
+                                                       30
+                                               );
+                                       } else if (event.where) {
                                                backtrace = "<p style=\"margin-top: 20px;\">" +
                                                        "<strong>Backtrace:<\/strong><br \/>" +
                                                        event.where.replace(/#/g, "<br \/>#") +
                                                        "<\/p>";
+                                               extDirectDebug(
+                                                       "<p>" + event.message + "<\/p>" + backtrace,
+                                                       event.method,
+                                                       "ExtDirect - Exception"
+                                               );
                                        }
 
-                                       extDirectDebug(
-                                               "<p>" + event.message + "<\/p>" + backtrace,
-                                               event.method,
-                                               "ExtDirect - Exception"
-                                       );
+
                                }
                        });