The tagadelic module works by calculating the weighting for each taxonomy term and storing it in the weight property of the taxonomy object. The taxonomy_redirect module, in the taxonomy_redirect_term_path() function, resets this property to the default (in case the term passed into the function is incomplete).
Now, I would suggest that the tagadelic module should probably be storing the weight that it wants to use somewhere other than the default weight location, but I would also suggest that the taxonomy_redirect_term_path() function shouldn't be stamping on that value if it has already been set anyway. I'll post a similar bug to the tagadelic issue queue.
Anyhow, working around this is easy - just check whether the values have been set already before resetting them to the defaults, i.e. change this code
// Get term data in case the term passed in is incomplete.
$t = taxonomy_get_term($term->tid);
$term->name = $t->name;
$term->description = $t->description;
$term->weight = $t->weight;
to this
// Get term data in case the term passed in is incomplete.
$t = taxonomy_get_term($term->tid);
if (!isset($term->name)) {
$term->name = $t->name;
}
if (!isset($term->description)) {
$term->description = $t->description;
}
if (!isset($term->weight)) {
$term->weight = $t->weight;
}
I've attached a patch against the current release to do this.
| Comment | File | Size | Author |
|---|---|---|---|
| taxonomy_redirect_nostamp.patch | 734 bytes | elyobo |
Comments
Comment #1
elyobo commentedNote that upcoming releases of tagadelic will be working around this anyway; I still suggest that the fix be made to ensure that similar problems don't happen with any other modules that attempt to do similar things. The tagadelic bug is listed over here - http://drupal.org/node/380100
Comment #2
agileware commentedThanks for the patch.
Committed to 5.x-1.x and 6.x-1.x branches.
Comment #3
agileware commentedMarked #441566: taxonomy_redirect and tagadelic - can go ogether well? as duplicate of this issue
Comment #5
devkinetic commentedmisposted
Comment #6
devkinetic commented