Sorry for long text, but I really want to fix this bug and fully utilize this unique (and great) module. In short. When I add CT-tag to any node that not yet associated with Community Tags, it adds yet one empty tag to database table.

The sequence of my actions:

I have installed Community Tags, Community Tags Node, CT Views, CT Views Pack. Created a normal free tagged vocabulary and activate community tagging on this vocabulary (option: "Synchronisation of node terms and community tags added or removed by node editors"). Add first (only one!) tag via "Tag this" link on full node. In admin/content/taxonomy/vid two new entries appeared. The first - is empty. Second - my tag. In admin/settings/community-tags two new tags appeared. At the database table «community_tags» two new entries appeared (tid nid uid date):
345 160 1 1309598458
346 160 1 1309598458

Now add another tag to other node. In admin/settings/community-tags two new tags appeared. Total 4. And two new entries added to the database table «community_tags». Now it looks follows (tid nid uid date):
345 159 1 1309599271
345 160 1 1309598458
346 160 1 1309598458
347 159 1 1309599271
In admin/content/taxonomy/vid one new entry appeared - tag I added to second node (nid 159). Total in admin/content/taxonomy/vid now three entries: first - empty, second - tag I added to the second node, third - tag I added to the first node.

With the third added tag repeats the same. Two more entries in the admin/settings/community-tags. One entry in the admin/content/taxonomy/vid. And two more entries in the database:
345 158 1 1309600013
345 159 1 1309599271
345 160 1 1309598458
346 160 1 1309598458
347 159 1 1309599271
348 158 1 1309600013
(After adding the tags they, as expected, appears above the CT-form, but there is empty space before them, as if there is another invisible tag.)

All above is the case when I add first CT-tag to the node. If I want to add another tag to the node that is already associated with another CT-tag, an "empty" tag has not appears - yet one entry everywhere and database looks as follows:
345 158 1 1309600013
345 159 1 1309599271
345 160 1 1309598458
346 160 1 1309598458
347 159 1 1309599271
348 158 1 1309600013
349 159 1 1309600547

The same things happens to other users.

Ok. Now, out of curiosity, I will add another dictionary. Let's see what happens. Add a tag via "Tag this" link on full node to the second vocabulary. In admin/content/taxonomy/vid2 everything is Ok - only one record appears - the tag that I just added. In admin/settings/community-tags two new entries appeared: one in the first vocabulary, and one in the second. The database:
345 157 1 1309603531
345 158 1 1309600013
345 159 1 1309599271
345 160 1 1309598458
346 160 1 1309598458
347 159 1 1309599271
348 158 1 1309600013
349 159 1 1309600547
350 157 1 1309603531

So, in the case with two vocabularies an empty tag is added each time the CT-tag was first added to the node. When we add a tag to node that is already associated with another CT-tag, empty tag does not appears - only one entry added to the second vocabulary.

If we uncheck "Enable community tagging" for the first dictionary - nothing will change, as if it is not turned off. Empty tag will adds to the first vocabulary for each new node. All the same manner as in the case of two dictionaries.

Now, if we completely delete the first dictionary and try to add the CT-tag for the new node, we have empty tag in the second dictionary. It's like bad magic))

P.S. And I get the following warning:

user warning: Duplicate entry '302-15-160' for key 1 query: INSERT INTO 

community_tags (tid, nid, uid, date) VALUES (302, 160, 15, 1309595005) in 

/home/virtwww/.../http/sites/all/modules/community_tags/community_tags.module on line 1162.
    user warning: You have an error in your SQL syntax; check the manual that 

corresponds to your MySQL server version for the right syntax to use near '= 159) GROUP 

BY tid' at line 13 query: SELECT DISTINCT(term_data.tid) AS tid, term_data.name AS 

term_data_name, term_data.vid AS term_data_vid, term_node_count.node_count AS 

term_node_count_node_count, term_node_count.tid AS term_node_count_tid, 

node_community_tags__community_tags.tid AS node_community_tags__community_tags_tid, 

COUNT(community_tags_aggregates.tid) AS ct_tag_count FROM term_data term_data 

INNER JOIN node node_community_tags ON nid = node_community_tags.nid LEFT JOIN 

term_node_count term_node_count ON term_data.tid = term_node_count.tid LEFT JOIN 

community_tags node_community_tags__community_tags ON node_community_tags.nid = 

node_community_tags__community_tags.nid INNER JOIN community_tags 

community_tags_aggregates ON term_data.tid = community_tags_aggregates.tid WHERE 

(term_data.vid in ('22')) AND (.nid = 159) GROUP BY tid in /home/virtwww/.../http/sites/all/modules/views/includes/view.inc on line 775.

Comments

1kenthomas’s picture

Seem to have a similar issue here; sometimes the tag saves and is available on subsequent views; sometimes it is an empty (null) tag.

chaps2’s picture

Status: Active » Fixed

Thank you both for reporting, and thank you @fastforward for your detailed report. I have committed a fix and will make a release soon.

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