New Tagging erases existing tag in different vocabulary
OneClickVentures - August 11, 2008 - 20:16
| Project: | Community Tags |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Description
I have two vocabularies assigned to my node. A Category non-tag vocabulary and a Tag tag vocabulary.
When new tags are added using community tag, it removes all my Category tags.

#1
This patch for the 5.x version fixes this version as well (line numbers are off, I'm sure):
http://drupal.org/node/159479#comment-581505
#2
having the same problems. is this fixed in the 6.x-dev version?
#3
patch seems to work for 6.x
#4
Subscribing... will test the patch as well and report back.
(no, it is not fixed in the 6.x-dev 2008-Aug-23 version yet)
#5
No patches here so moving it to active.
#6
Here is a proper patch for 6.x-1.x-dev.
#7
The patch from #6 provided by david is already included in the latest dev snapshot of the module.
#8
Yes, the patch #6 is included but it shouldn't be.
In latest 6.x-1.x-dev release @ line 370 I read:
$result = db_query('SELECT n.tid, n.nid FROM {term_node} n LEFT JOIN {community_tags} c ON n.tid = c.tid AND n.nid = c.nid INNER JOIN {term_data} d ON n.tid = d.tid WHERE n.nid = %d AND c.nid IS NULL AND d.vid IN ('. $placeholders .')', $nid, $community_tagged);which is wrong.
It seems to me that #6 diff should be the other way around.
#9
it is backwards.
I switched the +'s for -'s in #6 and it looks like it worked.
#10
Yes, the patch in #6 fix this bug. However, another bug come up : If the node is in the forum , new Tagging erases the forums' taxonomy ! The node will no longer in the forum after tagging.
#11
I also had this problem, and applying the reverse of the patch in #6 appears to have fixed the problem for me as well.
Quick question to everyone with this problem: were you only losing terms that were in your first vocabulary (vid 1)? Being curious, I'm looking at the old code to see why there was a problem to begin with. It looks like the
$community_taggedarray was being passed as the value for a single%d. It also appears that sites with more than one vocabulary configured for community tags may have not been working correctly. The opposite of what's in the patch in #6 (switch around the -'s and +'s) fixes both of these problems, as far as I can tell.#12
Ya, I have the first vocabulary for categories and the second for community tags. I used the latest dev snapshot which includes the patch in #6. But the bug was still there i.e. the category became blank on node edit page. So I applied the reverse of the patch in #6 and it works. Weird.
#13
Sorry, it's not clear to me whether the latest dev version has fixed this problem. My understanding is no - that the latest dev version still requires patching so that Community Tags won't delete terms in an unrelated vocabulary.
This bug is critical and renders the module unusable for me. Could someone update the dev snapshot with a fixed version? Better yet, if we could also fix "Cannot delete tags using My Tags X" it would destroy what are in my opinion two seriously important bugs.
#14
For me #6 + #9 solved the problem.
#15
same here, #6+#9 made things work again.
@fractile81: yep, vocabulary 1 only here too
#16
so... is this gonna be in a release or do i have to patch?
thanks for this cool module!
#17
I have tested last #6+#9 patch and works fine as the rest of people that already have reported it.
I attach the patch re-rolled in the right format.
#18
thanks jcmarco and david seth, I will commit this tomorrow.
#19
committed
#20
Automatically closed -- issue fixed for 2 weeks with no activity.