Closed (fixed)
Project:
Community Tags
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2009 at 09:19 UTC
Updated:
21 Feb 2011 at 14:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
advseb commentedOk, seems that it can be easily fixed. Change community_tags.module (1.37.2.5) in function community_tags_node_view($node, $inline = TRUE):
below line 457
$vid = array_shift(community_tags_vids_for_node($node));add
Currently, I don't have access to a good diff tool, therefore we have to live with this descriptional patch :-)
Comment #2
caschbre commentedI'm also having this issue.
What does that fix do specifically?
Is it safer to use the block solution temporarily?
Comment #3
advseb commentedThe patch prevents that the tag widget is shown for all content types instead of just showing it for the content types the vocabulary is enabled for.
Comment #4
entrigan commentedHas anyone else successfully tested this?
Comment #5
jcmarco commentedI found this bug in a webform where I didn't have any assigned taxonomy, but the bug comes from the view operations in community_tags_nodeapi.
Here in the hook_nodeapi is the problem, where it assigns the $node->community_tags_form's without control if this content type has taxonomy with tags or not, or even the case where if it had some taxonomy with tags and later it was removed, in this case it is not updated neither. Only if the content type had the tags form inline settings on.
So probably it would be needed some best control of the $node->community_tags_form.
Checking the tagadelic module, that is mandatory for this module, I found that on its hook_nodeapi, the $node->tags is already created
if ($op == 'load') {
$node->tags = tagadelic_node_get_terms($node);
}
So I guess that is not needed to do the same in the community tags hook_nodeapi.
In the next line is where we could add the tags and taxonomy control:
$node->community_tags_form = variable_get('community_tags_display_'. $node->type, COMMUNITY_TAGS_MODE_TAB) == COMMUNITY_TAGS_MODE_INLINE;
The tagadelic_node_get_terms($node)) function return a $tags array if it could have tags (even empty) but it doesn't return anything if there is not taxonomy with tags (NULL), this is why I have added this conditional $node->community_tags_form creation.
(I also removed and unneeded global $user in view op)
Comment #6
chaps2 commentedI've implemented a slightly more comprehensive fix that removes workflow options on content type admin pages, and correctly determines ctags form visibility for tab, inline and block.
Thanks for reports and patches. Fixed in 1.x and 2.x.