Stumbled upon a case today where newly added tags weren't getting saved (as in - and entry was added in the community_tags table but the term itself was not created). After some digging I discovered that new terms won't be created if during _community_tags_node_process_tags_and_terms() a matching one is found in some other vocabulary than the one designated for community tagging.

This part never got executed, since $matching_term was assigned a value anyway.

 if (!$matching_term) {
    $processed_terms[$vid]['new tags'][] = $tag;
 }

Attached a diff with a proposed fix.

CommentFileSizeAuthor
ct_matching_terms.diff871 bytesartis.bajars

Comments

chaps2’s picture

Status: Needs review » Fixed

Many thanks for the bug report and patch. I wasn't able to apply the patch but made the changes by hand. Committed and tagged 7.x-1.0-beta4.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.