Drupal 5 Version not Valid XHTML 1.0 Strict
andregriffin - June 12, 2008 - 17:02
| Project: | Framework |
| Version: | 5.x-1.9 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | andregriffin |
| Status: | closed |
Jump to:
Description
If you have search elements enabled for Framework, a Drupal 5 bug will create this validation error: "ID "edit-submit" already defined"
The following code can be added to the bottom of template.php to fix this.
/**
* Fixes illegal duplicate html id's "edit-sumit".
*/
function phptemplate_submit($element) {
static $dupe_ids = array();
if (isset($dupe_ids[$element['#id']])) {
$dupe_ids[$element['#id']]++;
$element['#id'] = $element['#id'] .'-'. $dupe_ids[$element['#id']];
}
else {
$dupe_ids[$element['#id']] = 0;
}
return theme('button', $element);
}
#1
Automatically closed -- issue fixed for two weeks with no activity.