Vocabulary disappears from node/edit on nodes with comments OFF

Flying Drupalist - February 5, 2009 - 03:20
Project:Comment alter taxonomy
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

The enabled vocabulary is able to be edited from comments, but the field disappears from node/edit.

#1

Flying Drupalist - February 9, 2009 - 23:58
Category:bug report» feature request

I see, this is by design. Whether or not to do that should probably be optional.

#2

aclight - February 10, 2009 - 00:25
Status:active» by design

Right, this is by design. If you were able to edit a nodes vocabulary from the node edit form, then comment_alter_taxonomy would not be able to track that change to the term and things would get pretty confusing. I believe that if you have the proper permissions you should be able to delete the term via a comment and then delete that comment. I'm setting this issue to "by design" because I can't think of a way that we could allow adding/removing of terms on the node edit page itself without the module's code being insane. If you have a simple solution in mind you can set the status back and we can discuss.

#3

Flying Drupalist - February 10, 2009 - 17:14

I don't see the need for all taxonomy changes to be recorded in comments. That's useful if non-author is the one who wants to change terms, but the author should still be able to set initial terms.

Even if you disagree, it wouldn't hurt to put it as an option?

#4

aclight - February 10, 2009 - 17:29

The problem is with keeping track of that terms are assigned to a node at any time. If we allow changes via node/edit but don't keep track of those, then any display of terms in the comments will not necessarily be correct, and that's a problem we'd like to avoid.

Probably there are two use cases for this module:

1. People who want users to be able to change the terms on a node from a comment but don't actually care about who changed the term or what the change was.

2. People who want to keep track of all changes to terms made via comments and want to display those changes on each comment.

I wrote the module for #2, though the module itself doesn't have the capability to actually show these changes (that's done by the project issue tracking module).

I guess I wouldn't be completely opposed to use case #1, but I think it could be quite confusing for users if they tried to switch back and forth between just allowing terms to be changed and actually tracking the changes of the terms. I might consider committing a patch that somehow separated the functionality that allows terms to be changed from comments and the part that actually keeps track of the changes in the database, but this isn't something that I need myself, so I'm not very likely to work on it.

If you really wanted to you could probably override the unsetting of the term edit fields that the module does by writing a simple module that implemented hook_form_alter and put all the form widgets back on the form.

#5

beginner - February 11, 2009 - 06:50
Title:Vocabulary disappears from node/edit» Vocabulary disappears from node/edit on nodes with comments OFF
Status:by design» active

While I understand aclight's point of view, I have another use case for you:

One vocabulary is shared between two node types. One is issue_issue node type like this node, which of course accepts comments and where changes in vocabulary terms are recorded with each comment. The other node type, however, does not accept comments: they are turned off. So after the initial node commit, it is impossible to change the vocabulary terms anymore.

So, at the very least, the turning off the vocabulary form item should be conditional to the node accepting comments.

#6

aclight - February 11, 2009 - 04:05

@beginner: Can't you just remove the "alter taxonomy on [node type]" permission for the node type that does not allow comments? Or does the module remove the taxonomy fieldset even in the case where altering the terms on a node type are not permitted due to insufficient permission?

#7

beginner - February 11, 2009 - 06:48

I tried removing the permission as you suggested, but it make no difference either way. I tried with user 1 and another user.

The taxonomy fieldset is present on node/add but not on node/$nid/edit whatever the permission.

Anyway, from a UI perspective, this setting to achieve what I am after would be counter intuitive.

 
 

Drupal is a registered trademark of Dries Buytaert.