Error processing in blocktype config window

Bug #675564 reported by Ruslan Kabalin
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Ruslan Kabalin

Bug Description

As it was pointed out in https://bugs.launchpad.net/mahara/+bug/675385, "processing form" never ends in some cases.

Brief investigation has shown that even if form processing ever ends with any of feed URL failure, no detailed information about the error apart of standard pieform error header (i.e. "...Please check the marked fields and try again") in the main window (as block config form is closed by that time) is displayed.

Changed in mahara:
status: New → Confirmed
assignee: nobody → Ruslan Kabalin (ruslan-kabalin)
Revision history for this message
Ruslan Kabalin (rkabalin) wrote :

There are two causes of this bug has been fixed:

1. Form validation method does not handle XML_Feed_Parser_Exception (b63f327630)
2. Curl default time-out of 60 sec might be too log and make user think that from processing "is frozen" (63b3d9ad54)

Though one problem is still there. We have to decide whether we want to close block config window in case of failure (such as XML_Feed_Parser_Exception). If we need to close it, I will make changes so that error text will be propagated to the main window and be shown instead of "Please check the marked fields and try again". If the block config window should rather remain open and error displayed under URL field, then f032d6f1d9 fix has to be revised as currently it causes block config window to be closed and general form error displayed in the main window.

Revision history for this message
Ruslan Kabalin (rkabalin) wrote :

Forgot to push my two commits mentioned above and can't access my work PC to do that right now. Will do that first thing tomorrow morning.
So, do not be confused, b63f327630 and 63b3d9ad54 are not on master yet.

Revision history for this message
Richard Mansfield (richard-mansfield) wrote :

Hi Ruslan,

I think in the case of feed errors the block config window should remain open and maybe the timeout reduced, as you suggest. So feel free to do whatever you want with f032d6f1d93, including reverting it altogether if you like, or maybe just removing the part that gets rid of the config block.

f032d6f1d93 is there because I was doing a bit of a proof of concept for a fix of bug #547773, but it won't fix that bug anyway with stock htmlpurifier. I was testing it with a hacked htmlpurifier which threw exceptions when it was running too long. I left it in the code in case htmlpurifier exceptions do get thrown sometimes, but I haven't actually seen that happen, so it's probably safe to get rid of it.

Revision history for this message
Ruslan Kabalin (rkabalin) wrote :

Hi Richard,

I have removed that JS bit only (2a5ec5b7bc). Also decided to remove formError function, so that error is not shown on background window (23c3b899a). It looks like we do not use $form->reply or $form->json_reply with PIEFORM_ERR anywhere in block config related functions, so the only case when blockConfigError is called is field error and there is really no point to show general "check the marked fields" in the main window behind the active one. Correct me if I am wrong.

Changed in mahara:
status: Confirmed → Fix Committed
summary: - Error processing in External feed blocktype
+ Error processing in blocktype config window
Changed in mahara:
milestone: none → 1.4.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.