Fixed bug #16971: Improve ExtDirect error handling (Thanks to Stefan Galinski)
authorSteffen Gebert <steffen.gebert@typo3.org>
Thu, 20 Jan 2011 22:42:30 +0000 (22:42 +0000)
committerSteffen Gebert <steffen.gebert@typo3.org>
Thu, 20 Jan 2011 22:42:30 +0000 (22:42 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10174 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_pagerenderer.php
typo3/backend.php
typo3/sysext/lang/locallang_misc.xml

index 1479b33..4d33dc0 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 2011-01-20  Ingo Renner  <ingo@typo3.org>
 
-       * Fixed issue #14098: When sending mail, use TYPO3_CONF_VAR for default from address if no other address is provided, credits Jeff Segars and Marcus Krause
+       * Fixed issue #14098: When sending mail, use TYPO3_CONF_VAR for default from address if no other address is provided (Thanks to Jeff Segars and Marcus Krause)
 
 2011-01-20  Tolleiv Nietsch  <typo3@tolleiv.de>
 
@@ -29,6 +29,7 @@
 
        * Fixed bug #17044: Styling of TCEforms with renderMode=checkbox
        * Fixed bug #17155: Active and hover states are hard to distinguish
+       * Fixed bug #16971: Improve ExtDirect error handling (Thanks to Stefan Galinski)
 
 2011-01-20  Ernesto Baschny  <ernst@cron-it.de>
 
index 612120f..8c1ca71 100644 (file)
@@ -985,19 +985,28 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        };
 
                        Ext.Direct.on("exception", function(event) {
-                               var backtrace = "";
-                               if (event.where) {
-                                       backtrace = "<p style=\"margin-top: 20px;\">" +
-                                               "<strong>Backtrace:<\/strong><br \/>" +
-                                               event.where.replace(/#/g, "<br \/>#") +
-                                               "<\/p>";
-                               }
+                               if (event.code === Ext.Direct.exceptions.TRANSPORT && !event.where) {
+                                       TYPO3.Flashmessage.display(
+                                               TYPO3.Severity.error,
+                                               TYPO3.LLL.extDirect.timeoutHeader,
+                                               TYPO3.LLL.extDirect.timeoutMessage,
+                                               30
+                                       );
+                               } else {
+                                       var backtrace = "";
+                                       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"
+                                       );
+                               }
                        });
 
                        Ext.Direct.on("event", function(event, provider) {
index 8fb60fd..c2f9cad 100644 (file)
@@ -525,6 +525,10 @@ class TYPO3backend {
                                'helpDescriptionPages',
                                'helpDescriptionContent',
                        ),
+                       'extDirect' => array(
+                               'timeoutHeader',
+                               'timeoutMessage',
+                       ),
                );
                $generatedLabels = array();
                $generatedLabels['core'] = $coreLabels;
index 0843160..125ebc3 100755 (executable)
                        <label index="liveSearch_helpTitle">How to use advanced search tags</label>
                        <label index="liveSearch_helpDescription">Search in certain tables:</label>
                        <label index="liveSearch_helpDescriptionPages">#page:Home will search for all pages with the title "Home"</label>
+                       <label index="extDirect_timeoutHeader">Connection Problem</label>
+                       <label index="extDirect_timeoutMessage">Sorry, but an error occurred while connecting to the server. Please check your network connection.</label>
                </languageKey>
        </data>
 </T3locallang>