We've found a little annoying bug in the validation handler of freetagging widgets. It fails when a field is shared between several content types, but they have different per instance settings.
The problem is the API used to retrieve the $field structure in content_taxonomy_autocomplete_validate(). It just passes the field name, and CCK returns information about just one field instance in that case.
It can be fixed by requesting the field information of the corresponding content type:
function content_taxonomy_autocomplete_validate($element, &$form_state) {
$field_name = $element['#field_name'];
- $field = content_fields($field_name);
+ $field = content_fields($field_name, $element['#type_name']);
- $field_key = $element['#columns'][0];
This is one liner fix. Please, let me know if you need a formal patch. Thanks
Comments
Comment #1
markus_petrux commentedOops. I made a typo in the code above. Sorry.
Comment #2
mh86 commentedyep, this has been missing. patch committed :) thanks!