Posted by CompuBase on December 18, 2007 at 5:20pm
4 followers
Jump to:
| Project: | Taxonomy Access Control |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Terms are created twice in a Autocomplete field if the Taxonomy Access module is installed.
I am not sure whether this is a Content Taxonomy problem or a Taxonomy Access Control problem.
Comments
#1
More info:
content_taxonomy_autocomplete_widget is called twice with $op=process form values.
This is probably caused by bug http://drupal.org/node/118645
Furthermore:
content_taxonomy_autocomplete_tags_get_tids does not get the created in term in the first round since TAC has not set it's access control yet and will not include the just created term id as an accessible term for ther current user.
When I change in content_taxonomy_autocomplete_widget()
case 'process form values': to case 'submit':
everything works fine.
Reading the comments in CCK's field.php hook_widget()
* @param $op
* What kind of action is being performed. Possible values:
* - "prepare form values": The editing form will be displayed. The widget
* should perform any conversion necessary from the field's native storage
* format into the storage used for the form. Convention dictates that the
* widget's version of the data should be stored beginning with "default".
* - "form": The node is being edited, and a form should be prepared for
* display to the user.
* - "validate": The user has just finished editing the node and is
* trying to preview or submit it. This hook can be used to check or
* even modify the node. Errors should be set with form_set_error().
* - "process form values": The inverse of the prepare operation. The widget
* should convert the data back to the field's native format.
* - "submit": The user has just finished editing the node and the node has
* passed validation. This hook can be used to modify the node.
As far as I understand the submit should be called anyway.
Please let me know what you think about this!
Cheers, Joep
#2
I have the same issue. Tracking.
#3
same issue, but i have more troubles: if i change radiobutton on
Save options:
Save as tag
Save in cck table
Both
in any way i have 2 terms in my vocab and they are at the highest level of taxomomy
#4
Confirming that this is still a problem in 6.x.
#5
Marked #356590: Duplicate Terms as duplicate.
#6
Marked #171398: Duplicate entries created in taxonomy if field has same name as vocabulary as duplicate.
#7
See also #676176: Caching in tac_db_rewrite_sql results in duplicate tags for freetaging vocabularies, #198773: Free tag vocabularies do not respect TAC and may cause duplicate term insertion.
#8
Note that if TAC is enabled and the user tags a node with core taxonomy (without a Content Taxonomy field), it works fine. If TAC is disabled, it also works fine.
#9
Note also that it does not occur when logged in as the administrative user, and only if Save values additionally to the core taxonomy system (into the 'term_node' table) is checked for the field. I'll post some steps to reproduce shortly.
#10
Steps to reproduce:
#11
If the role is properly granted Create permissions for the vocabulary default after following the steps in #10 above, the term duplication seems to stop. So, I think this is a TAC issue.
#12
#13
#14
#15
Still experiencing this issue... any help is greatly appreciated.
#16
#15: This is a known issue. Have you tried adding "create" permissions to the vocabulary default for the role?
#17
Thanks for your reply. I unfortunately posted my issue prematurely, the issue was something unrelated triggered by the rules module. Sorry again, and thanks for the support.