Needs work
Project:
Auto Tagging
Version:
6.x-1.4-beta3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2011 at 14:37 UTC
Updated:
2 Jan 2014 at 19:06 UTC
Jump to comment: Most recent
When using a module like VBO or Media Mover to programmatically re-save nodes, autotagging attempts to duplicate node_term relationships which already exist in the node, resulting in a user warning for each term in place.
Comments
Comment #1
lightsurge commentedI'm guessing this might be something to do with it?
http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.module/func...
For some reason on node_load the taxonomy terms aren't in a format that can currently be dealt with properly by autotagging? I'm not a programmer, although I've hacked around a bit but with no success coming up with a fix.
Sample of warning (one for each pre-existing term):
user warning: Duplicate entry '199-170' for key 1 query: INSERT INTO term_node (nid, vid, tid) VALUES (170, 170, 199) in /modules/taxonomy/taxonomy.module on line 719.
Comment #2
lightsurge commentedAs I don't need to be able to change tags on a programmatic node_save, I just added this code:
Which won't be a solution for everyone. But I couldn't work out how to get $node->taxonomy dealt with properly... So this just invokes taxonomy nodeapi to replace it.