Closed (fixed)
Project:
Framework
Version:
5.x-1.9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Jun 2008 at 17:02 UTC
Updated:
26 Jun 2008 at 17:13 UTC
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
Comment #1
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.