Active
Project:
Taxonomy Image
Version:
6.x-1.6
Component:
Contrib Node Display
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jun 2009 at 15:21 UTC
Updated:
28 Jun 2009 at 15:21 UTC
taxonomy_image_node_display.module line 125 should be changed from this
120: foreach ($node->taxonomy as $tid => $term) {
121: $image = taxonomy_image_display($tid, NULL, $preset, array('wrapper' => FALSE));
122: if ($view_link && $image) {
123: $image = theme('taxonomy_image_display', $image, $term);
124: }
125: $images[] = $image;
126: }
to this
120: foreach ($node->taxonomy as $tid => $term) {
121: $image = taxonomy_image_display($tid, NULL, $preset, array('wrapper' => FALSE));
122: if ($view_link && $image) {
123: $image = theme('taxonomy_image_display', $image, $term);
124: $images[] = $image;
125: }
126: }
Why? Whit current code in situation when node has taxonomies but that taxonomies don't have images $images array will have elements with empty strings. Because of that theme_taxonomy_image_display_images will render taxonomy-images div which is empty. Whit proposed change taxonomy_image will work as expected in this special cases.