I've found a display glitch when a content type has two autocomplete taxonomy fields, each of which is set to display a different Vocabulary under "Specify terms to show". It's easiest to describe with an example:
Let's say, for the "restaurant" content type, that taxonomy field 1 is set to display terms from the "Cuisine" vocabulary, and taxonomy field 2 is set to display terms from the "Atmosphere" vocabulary. If a restaurant node has both fields set to "Irish", content_taxonomy_field_formatter gets an $item array that contains both the "Irish" term from "Cuisine" and the "Irish" term from "Atmosphere" for either of these fields. Since content_taxonomy_field_formatter isn't filtering the $item array by $field['vid'], both of the "Irish" terms are displayed for each field.
I've attached a patch that does this filtering and fixes the problem for me.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | content_taxonomy.210824.patch | 905 bytes | sutharsan |
| content_taxonomy-specify-terms-to-show-limit-by-vocab.patch | 475 bytes | Biteme |
Comments
Comment #1
csc4 commentedGreat patch thanks - this fixes the problem for me.-
Comment #2
sutharsan commentedI have the same situation; two autocomplete content_taxonomy fields. Each assigned to a different vocabulary. Both vocabularies with a depth of 1.
The patch solved the problem.
Attached patch has a little touch of paint added for code style and is placed slightly different in the code to prevent errors if $item is not an array.
Comment #3
thepanz commented+1 for this patch, works fine!
I created a patch #259302: Add more formatters that includes this one, adding more formatters (list, and linked list), you know, theming terms separated by BR isn't too easy :)
Regards
Comment #4
k8n commentedAlso here, another version; should have posted my patch here: http://drupal.org/node/261421
Comment #5
socialnicheguru commentedsubscribing
Comment #6
Chris Johnson commentedWe are also successfully using the patch at http://drupal.org/files/issues/content_taxonomy.210824.patch. I recommend it being applied to the module by the maintainer, since the behavior without it is clearly wrong.
Comment #7
pcorbett commentedPatch works for me, too! This is a pretty necessary patch, let's get it committed...
Comment #8
magnus commentedCleanup of old issues. According to maintainer: "active development is only done for the 6.x branch! 5.x is not supported any more".
Reopen issue if problem still exist in 6.x branch.