mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #18051
[Bug 1305352] Re: Ajax "loading" spinners go forever when request fails
A few possible solutions:
1. A timeout on the spinner. If it waits too long, the spinner goes away
and is replaced with an error notifier. The problem with this, is
knowing how long to make the timeout. If a long-running request is
actually still going on, then changing to "error" may cause some
inconsistent results (unless we can also kill the request?). Different
timeouts may be appropriate for different ajax calls, so this should be
an optional parameter.
2. Make the ajax response scripts more robust, so that they always
return a valid response, no matter what. This might be something we
could do by perhaps using a different error handler if you set the JSON
flag on a script.
3. Make the ajax request code more robust, so that if it receives a
garbled response, it switches to an error message.
I haven't looked into this too deeply yet, so I'm not sure whether, in a
failure, the script on the server returns no response, or whether it
returns a response that is not valid json. This could affect which
choice is best. It's possible that we should implement more than one of
these options.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1305352
Title:
Ajax "loading" spinners go forever when request fails
Status in Mahara ePortfolio:
New
Bug description:
Users are always coming to us with problem descriptions that sound
like this, "I uploaded something and the spinner kept loading
forever," or, "I tried to install and it kept saying loading forever".
The problem is that when we do stuff via ajax we put up a "loading"
spinner until the request comes back. But, if the request fails, then
the spinner never comes down and the user waits and waits and waits,
and thinks that the problem is a timeout rather than a server back-end
error.
It would be good if we could come up with an across-the-board solution
for this.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1305352/+subscriptions
References