I've installed the Category module, used the taxonomy wrapper to import my taxonomy vocabularies, and everything seems fine, except that, in the list of category terms for each node, the last item is listed twice. Changing the categories for the node doesn't change things ... the final item is always listed twice, pointing to the same category alias. (See www.openleftbox.com to see what I mean.) I haven't changed any code in node.tpl.php, it still uses <span class="taxonomy"><?php print $terms?></span>, so I don't have a clue what is causing the problem. Any ideas?

Comments

venkat-rk’s picture

It is a bug that was introduced after a recent commit of a patch to make category work better with the views module. No fix available at the moment, although I am sure Jaza is aware of it.

An interim solution may be to turn off display of categories for assigned nodes in the category_display settings of your container.

CosmicVoyager’s picture

Thanks for the info ... it's good to know it wasn't something stupid I forgot to do. I've gone back to taxonomy for now, but will probably try out category again later.

jvalletto’s picture

Jaza,

I think I found where the problem might lay.

In the created taxonomy.module for the taxonomy wrapper:

About Line 21:

function taxonomy_link($type, $node = NULL) {
  if ($type == 'taxonomy terms') {
    $type = 'categories';
    if (isset($node->taxonomy) && is_array($node->taxonomy)) {
      foreach ($node->taxonomy as $term) {
        $cat = category_get_category($term->tid);
        $node->category[$cid] = $cat;
      } 
    }
  }
  elseif ($type == 'node') {
    return array();
  }

  return category_link($type, $node);
}

Commenting out...

     /* foreach ($node->taxonomy as $term) {
        $cat = category_get_category($term->tid);
        $node->category[$cid] = $cat;
      } */

....seems to fix the problem on my end.

I hope this helps you commit a fix to this bug soon.

Jeremy.

P.S. To All, I will not recommend using this fix by any means, as I am not sure of any after effects. I would recommend waiting for an patch or commit by Jaza.

bdragon’s picture

Status: Active » Closed (duplicate)

Marking as duplicate of
http://drupal.org/node/74629

Please watch that issue for updates.

Thank you for your patience.
--Brandon

venkat-rk’s picture

As posted in http://drupal.org/node/86453, this bug persists even with the category module of 25th Sep'06.

The new twist that I noticed with today's testing is that, when I moved around the weights of the categories, the double link disappeared! I am completely stumped.