https://bugzilla.wikimedia.org/show_bug.cgi?id=32408

--- Comment #14 from Lupo <[email protected]> 2012-12-01 12:14:58 UTC ---
(In reply to comment #13)
> Attempt to fix in 
> https://gerrit.wikimedia.org/r/#/c/36342/

Showing hidden parts that contain errors is certainly a good idea. However, in
my case the problem was not with the additional info, and anyway, if you go
that route, I think it should be done in a general way (find all error divs,
check that they're all visible, and if not, make them visible by ensuring that
the whole parent hierarchy is shown). A special case just for the additional
info part won't fix this completely.

In my case, I had, in search for a way to enter the custom license
"{{PD-ineligible}}", clicked once on "This is not my own work". When I did
that, input fields for source, author, etc. were added to the form. I didn't
enter anything, but chose again "This is my own work". At that point, the "not
own work" fields in the form got hidden, but they remained in the form's DOM.
They didn't have sensible values, though, and thus final validation failed.

If I understood comment 12 correctly, the problem in this case is that the
whole form is validated finally via the jQuery validation plugin, which just
calls validators on all fields in the form. It doesn't know about the logical
hierarchy or about fields being hidden but just goes through all form inputs
and calls a validation method.

Now, I see two ways to properly fix this in mw.UploadWizardDeed.js:

1. the individual deeds' validators must check whether the deed is selected at
all and just return true if not, or

2. the deed selector must disable the de-selected deeds' form input
(presumably, the jQuery validation plugin is smart enough to skip disabled
inputs) and explicitly enable a selected deed's inputs.

Similar problems may exist in other places where fields are added to the form,
but shall be ignored because some other input's setting actually means "ignore
this field".

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to