Here is a patch fixing that behaviour:

-- primary_term.module.orig    2008-09-15 18:14:57.000000000 +0400
+++ primary_term.module 2009-10-12 14:17:26.000000000 +0400
@@ -34,16 +34,16 @@
         $tid = $node->primary_term->tid;
       }
       if (!empty($tid)) {
+        // Load the term so it's available to token/pathauto
+        $node->primary_term = taxonomy_get_term($tid);
         foreach ($node->taxonomy as $k => $v) {
-          if (is_array($v) && !empty($v[$tid])) {
+          if (is_array($v) && in_array($tid, $v)) {
             return;
           } else if (is_numeric($v) && $v == $tid) {
             return;
           }
         }
-        $node->taxonomy[] = $tid;
-        // Load the term so it's available to token/pathauto
-        $node->primary_term = taxonomy_get_term($tid);
+        $node->taxonomy[$node->primary_term->vid][] = $tid;
       }
       break;
     

Comments

sethcohn’s picture

Assigned: Unassigned » sethcohn

Review needed so we can commit this

rmjiv’s picture

See my comment here (http://drupal.org/node/357331#comment-2963448) about this.

rmjiv’s picture

Status: Needs review » Closed (duplicate)