Using the default theme (blue marine) and enabling every possible block ;-) i provoked the following error. It seems that the form id used for the login block and the search block are identical, causing this error at w3c.orgs validation service:
This page is not Valid XHTML 1.0 Strict!
Below are the results of checking this document for XML well-formedness and validity.
Error Line 60 column 46: ID "edit-form_id" already defined.
...pe="hidden" name="edit[form_id]" id="edit-form_id" value="user_login_block"
An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).
✉
Info Line 26 column 46: ID "edit-form_id" first defined here.
input type="hidden" name="edit[form_id]" id="edit-form_id" value="search_box" />
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | no_id_for_hidden_elements.patch | 616 bytes | chx |
Comments
Comment #1
morbus iffI think I'm gonna set this as wontfix, though it's certainly open for interpretation.
* Enabling the search.module adds a search form to the header of the bluemarine template.
* Enabling the search block adds the same search form to the sidebar.
They're the exact same form, in every possible way (save for their visual appearance, which is of little consequence in comparison to their action or their markup, which is what w3 checks for, of course). I'd say, honestly, that both approaches are right: yes, there's a duplicate ID because you've enabled a duplicate form on the site.
Pick only one ;)
Comment #2
morbus iffI'm an idiot. While it does hold true about the two search blocks, he was talking about user_login. Reexamining.
Comment #3
morbus iffComment #4
netbjarne commentedHey - I'm, glad that I wasn't supposed to choose either to have a login block OR a search block on my site - but not both ;-)
Nice work folks, this is going to be a great release :-D
Comment #5
Thox commentedThis applies to all pages with more than one form, since all forms have a form_id element.
Comment #6
chx commentedSolution is brutal but effective: I deleted id from hidden elements.
Comment #7
morbus iffI agree with this approach.
Comment #8
dries commentedCommitted to HEAD.
Comment #9
(not verified) commentedComment #10
freebt commentedWhen search block is enabled,cannot pass html validation(http://validator.w3.org).
Page DOCTYPE setting:
Comment #11
freebt commentedWhen search block is enabled,cannot pass html validation(http://validator.w3.org).
Page DOCTYPE setting:
Comment #12
archetwist commentedPages don't pass validation because some IDs are declared more than once. Example error message:
And this is because of this code (form.inc, line 972):
The
id="'. $element['#id'] . '"part has been added in the latest RC.Comment #13
grohk commentedBug has been re-introduced by patch #60017
A new issue and patch have been created. Marking as a duplicate of http://drupal.org/node/62366
Comment #14
archetwist commented