It doesn't respect the content types vocabulary settings

joachim - January 20, 2009 - 14:42
Project:Community Tags
Version:5.x-1.0-beta1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

The community tagging form appears on nodes whose type is NOT set for the community tagging vocabulary.

The form appears to allow users to tag these nodes.
This is incorrect -- if the vocabulary is not set on this content type, it shouldn't be possible to tag nodes of this type from this vocabulary.

#1

kiamlaluno - January 20, 2009 - 14:48
Title:doesn't respect vocabulary settings for content types: able to tag node types not in vocab» It doesn't respect the content types vocabulary settings

#2

joachim - February 11, 2009 - 09:51

Basically, hook_nodeapi needs to check the vocab applies to the current node, the same way hook_menu does.
I would suggest moving this out to a helper function to check that community tagging is required for the given node.

#3

kiamlaluno - February 11, 2009 - 10:08

I agree; it is the only way for the module to operate correctly.

If the module must show its form fields only on nodes which are associated with a specific vocabulary, then it must check if the node hook_nodeapi() received like argument has any taxonomy term of that vocabulary.

 
 

Drupal is a registered trademark of Dries Buytaert.