Posted by andregriffin on June 12, 2008 at 5:02pm
Jump to:
| Project: | Framework |
| Version: | 5.x-1.9 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | andregriffin |
| Status: | closed (fixed) |
Issue Summary
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);
}
Comments
#1
Automatically closed -- issue fixed for two weeks with no activity.