Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a known issue but I though I should just get this up here to point out another situation where there are dupicate id attributes breaking w3c validation.
The search button id and the comment controls button both have an id of "edit-submit". It's due to how form api works. Not a big deal but if anyone wants to get around this, you can create a theme override and manually change property.
example:
function phptemplate_comment_controls($form) {
// Override submit button id. was 'edit-submit'.
$form['submit']['#id'] = 'comment-controls-submit';
$output .= '<div class="container-inline">';
$output .= drupal_render($form);
$output .= '</div>';
$output .= '<div class="description">'. t('Select your preferred way to display the comments and click "Save settings" to activate your changes.') .'</div>';
return theme('box', t('Comment viewing options'), $output);
}
Related to this issue:
http://drupal.org/node/87708
http://drupal.org/node/71615
http://drupal.org/node/47785
http://drupal.org/node/71615
http://drupal.org/node/111719
Comments
Comment #1
dvessel CreditAttribution: dvessel commentedA more generalized approach.. this ID pops up in many places.
Something to use until it's fixed in core.
Comment #2
alexmarkley CreditAttribution: 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 #3
chx CreditAttribution: chx commentedhttp://drupal.org/node/111719