When I create a new Quiz (create content), the default input format for the Quiz description is not selected. If I select an input format, create the Quiz and then edit it, the input format is not saved.
We have identified what is causing this problem:
If you select pass/fail options, then there will be a text area for "Summary text if passed" and one for "Default summary text". The format filter radio buttons for "Summary text if passed" has a name attribute of "format", as follows:
<input type="radio" id="edit-format-2-1" name="format" value="2" checked="checked" class="form-radio wysiwyg wysiwyg-format-2 wysiwyg-editor-ckeditor wysiwyg-field-edit-summary-pass wysiwyg-status-1 wysiwyg-toggle-1 wysiwyg-resizable-1 wysiwyg-processed">
If you look at the radio button fields for the quiz description, they also have a name attribute of "format", as follows:
<input type="radio" id="edit-format-1-2" name="format" value="1" checked="checked" class="form-radio wysiwyg wysiwyg-format-1 wysiwyg-editor-none wysiwyg-field-edit-body wysiwyg-status-1 wysiwyg-toggle-1 wysiwyg-resizable-1" />
Because these belong to different sets, this is causing an issue. We have debugged it by copying the HTML source code and then removing chunks of HTML until the problem goes way (the default input format for the quiz description is selected).
So the problem is, 2 sets of radio button fields have the same name attribute. Each set has a default with check="checked" but as they have the same name, the first field with check="check" is failing.
I tried modifying the name="" attribute in a form_alter(), but it doesn't appear to have any effect on the generated HTML
Comments
Comment #1
blairski commentedI'm closing this ticket because it turns out that, while it appeared to be a bug with the Quiz module, there was something else in the code base causing it.
Comment #1.0
blairski commentedAdding clarity to the final sentance