Closed (duplicate)
Project:
Primary Term
Version:
6.x-1.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
14 Oct 2009 at 09:09 UTC
Updated:
13 May 2010 at 17:51 UTC
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
Comment #1
sethcohn commentedReview needed so we can commit this
Comment #2
rmjiv commentedSee my comment here (http://drupal.org/node/357331#comment-2963448) about this.
Comment #3
rmjiv commented