From 8a624c4dccbfa174d567e343f871939d5fd9e1a5 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 16 Apr 2017 21:50:17 +0200 Subject: [PATCH 1/2] [ticket/15174] Increase timeout for loading indicator The timeout is rather low with 15 seconds until reporting a timed out request. 25 seconds will be compatible with almost any setup. A lot more changes would be needed to do proper timeout checks on slow requests like purging the board cache. PHPBB3-15174 --- phpBB/assets/javascript/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index f7ace80705..aa2cc70636 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -41,7 +41,7 @@ phpbb.loadingIndicator = function() { if ($loadingIndicator.is(':visible')) { phpbb.alert($alert.attr('data-l-err'), $alert.attr('data-l-timeout-processing-req')); } - }, 15000); + }, 25000); } return $loadingIndicator; From f6458653338c1e4c6dee690f3b1317f89d333ed0 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 17 Apr 2017 09:59:22 +0200 Subject: [PATCH 2/2] [ticket/15174] Split timeout message to extra method and set timeout to 60s PHPBB3-15174 --- phpBB/assets/javascript/core.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index aa2cc70636..b079043396 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -33,20 +33,27 @@ phpbb.loadingIndicator = function() { if (!$loadingIndicator.is(':visible')) { $loadingIndicator.fadeIn(phpbb.alertTime); - // Wait fifteen seconds and display an error if nothing has been returned by then. + // Wait 60 seconds and display an error if nothing has been returned by then. phpbb.clearLoadingTimeout(); phpbbAlertTimer = setTimeout(function() { - var $alert = $('#phpbb_alert'); - - if ($loadingIndicator.is(':visible')) { - phpbb.alert($alert.attr('data-l-err'), $alert.attr('data-l-timeout-processing-req')); - } - }, 25000); + phpbb.showTimeoutMessage(); + }, 60000); } return $loadingIndicator; }; +/** + * Show timeout message + */ +phpbb.showTimeoutMessage = function () { + var $alert = $('#phpbb_alert'); + + if ($loadingIndicator.is(':visible')) { + phpbb.alert($alert.attr('data-l-err'), $alert.attr('data-l-timeout-processing-req')); + } +}; + /** * Clear loading alert timeout */