Silent errors on invalid form submissions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IVLE |
Fix Released
|
Low
|
William Grant |
Bug Description
At least one form fails silently if invalid form data is passed. This could be an idiom we're using but I don't really like it. I tried adding a field and it took me a very long time to discover why the validator wasn't working.
In the New Enrolments form:
http://
Try adding (with Firebug) a new text field with a funny name, e.g., "foo". Now if you click Enrol, the page will refresh with no errors, as if nothing had happened.
Internally, in ivle/webapp/
<span py:if="'user' in errors" class="
However, if the error is not with a particular field, but with the form itself, then the error object you get back will be u"The input field 'role' was not expected." (not a dictionary at all, but a string).
I think this error should be displayed somewhere, not just ignored. I can fix it in this particular instance, but I need to know if this is systemic or just an isolated case. ???
Related branches
Changed in ivle: | |
importance: | Medium → Low |
Changed in ivle: | |
assignee: | Matt Giuca (mgiuca) → nobody |
Changed in ivle: | |
assignee: | nobody → William Grant (wgrant) |
status: | Triaged → In Progress |
Changed in ivle: | |
status: | In Progress → Fix Committed |
Changed in ivle: | |
status: | Fix Committed → Fix Released |
New forms that I've added do not suffer from this problem. Anything deriving from BaseFormView just needs to have something like this in the template:
<div class="submit form_error" py:if=" defined( 'error_ value') " py:content= "error_ value" />