Last modified: 2011-11-22 07:29:50 UTC
One bug leads to a workaround, which leads to another bug... It probably makes less sense out of context, but individual bug reports were requested. This bug occurs when trying to workaround this bug: https://bugzilla.wikimedia.org/show_bug.cgi?id=24111 Here's fields and bug comments from my form: <!-- uploadoredit radio button field parameters "mandatory" with "default=edit" fails to prevent "None" radiobutton from appearing on edit pages. No workaround available other than hiding the entire field. --><nowiki /> <!-- uploadoredit radio button field show on select fails to function when field is hidden, so must use MediaWiki:Common.css to hide uploadoredit CSS class. --><nowiki /> <div class="hidden"> <!-- makes it so hidden uploadoredit fields below don't take up any space. Not necessary anymore to hide them with the uploadoredit CSS class, but whatever. --><nowiki /> {{{field | uploadoredit | class=uploadoredit | input type=radiobutton | values=upload, edit | default=edit | show on select=upload=>uploadfield;}}} <!-- Must duplicate this line to make buggy show on select hiding work. Workaround discovered by accident when accidentally pasting form code twice in form edit page. I don't know why it works. --><nowiki /> {{{field | uploadoredit | class=uploadoredit | input type=radiobutton | values=upload, edit | default=edit | show on select=upload=>uploadfield;}}} <!-- Must duplicate this line to make buggy show on select hiding work. Workaround discovered by accident when accidentally pasting form code twice in form edit page. I don't know why it works. --><nowiki /> </div>
You can't have the same template field more than once in a form definition, so I'm not surprised that something would break. I'm setting this to "invalid".
Looks like there was actually a bug behind this that wasn't immediately apparent as to the cause while the radio button field was hidden. I spent the day to pin it down in a demo for a new bug: https://bugzilla.wikimedia.org/show_bug.cgi?id=32580