mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #24713
[Bug 1318432] Re: Improve error reporting in Ajax installer/upgrader
I've merged Nigel's patch, but it doesn't really resolve the problem I'm
describing, which I guess is what happens when the script errors out
without returning properly formed AJAX.
So, I've pushed another patch to fix that problem. The core of it was
that we use the MochiKit JSON parsing method, which does no JSON
validation beforehand at all. It just does an eval() of whatever it gets
sent.
I've swapped it out for the JQuery JSON parser, which is smart enough to
throw an exception when it receives malformed JSON. Then we can catch
that exception and call the error callback method properly.
I think it'll be good to get this in for 15.04, because it'll help with
debugging installation issues.
https://reviews.mahara.org/4375
--
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/1318432
Title:
Improve error reporting in Ajax installer/upgrader
Status in Mahara ePortfolio:
In Progress
Status in Mahara 1.10 series:
New
Status in Mahara 15.04 series:
In Progress
Bug description:
We use an Ajax-based page to install & upgrade Mahara. For each
upgrade task it:
- fires off a separate Ajax request to run the task
- shows a "progress" spinner while it waits for a response
- and then once it gets a response it updates the page and fires off the next task
The problem is that this system doesn't handle errors well. If the
Ajax script errors out, it continues showing the "progress" spinner
forever. Consequently we get a LOT of error reports where people
complain that "installation takes forever", when in fact it errored
out after 30 seconds or whatever and it just never told them.
We need to update this process so that it actually lets you know when
it failed, and why.
The simplest solution, suggested by Robert, is that we put a timeout
on waiting for the Ajax response. Mahara sets max_execution_time
itself, so we could:
1. Make the ajax time out after max_execution_time
2. Show an error icon
3. Fire off a second ajax response to a script that gets any error messages from the session and displays those on the page.
That should be pretty robust against any type of error.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1318432/+subscriptions
References