Closed (duplicate)
Project:
Drupal core
Version:
5.x-dev
Component:
forms system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2006 at 00:38 UTC
Updated:
21 Sep 2007 at 12:19 UTC
Hello, I believe the "Recent Poll" block is not valid XHTML 1.0 strict...
These are the errors I get when the block is enabled. Without the block enabled, it validates 1.0 strict.
1. Error Line 263 column 56: ID "poll_view_voting" already defined.
<form action="/drupal48/node/21" method="post" id="poll_view_voting">
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).
✉
2. Info Line 157 column 58: ID "poll_view_voting" first defined here.
<form action="/drupal48/node/21" method="post" id="poll_view_voting">
3. Error Line 270 column 52: ID "edit-nid" already defined.
</div> </div><input type="hidden" name="nid" id="edit-nid" value="21" />
✉
4. Info Line 168 column 46: ID "edit-nid" first defined here.
</div><input type="hidden" name="nid" id="edit-nid" value="21" />
5. Error Line 272 column 48: ID "edit-poll-view-voting" already defined.
...put type="hidden" name="form_id" id="edit-poll-view-voting" value="poll_view_
✉
6. Info Line 170 column 48: ID "edit-poll-view-voting" first defined here.
...put type="hidden" name="form_id" id="edit-poll-view-voting" value="poll_view_
Comments
Comment #1
ChrisKennedy commentedThis is a general problem with the forms api due to the way it generates ids for each element. I'm not sure if anyone is working on a fix.
Comment #2
anders.fajerson commentedSubscribing (sorry).
Comment #3
theenglishguy commentedYou can validate this by using a bit of javascript. I outlined this in a post XHTML 1.1 & Multiple IDs. Should fix it :)
Comment #4
alexmarkley commentedThe whole "auto-generated form ids aren't unique enough" problem is pretty serious for me, so I'm subscribing to this issue. (The only intelligent thing I have to say about this family of issues.)
Comment #5
chx commentedhttp://drupal.org/node/111719