I have a block view that lists certain nodes and needs to access the taxonomy terms of those nodes to display things. I'm using taxonomy access to restrict access to certain content (duh) but it seems to be keeping the taxonomy terms from being added to the nodes in my view under certain circumstances. For some users the taxonomy terms are there most of the time but there are times (e.g. when the user requests 'node/add') where the taxonomy terms are not available in the view. I'm sure that I'm missing something here but for the life of me I can't figure it out. Does anyone know why taxonomy terms would not be available in node views (in the template.php file) under some circumstances and not others?
I'm using Drupal 5.10 and taxonomy_access 5.x-1.1.
Comments
Comment #1
KarlKedrovsky commentedI did some additional testing and found that the problem goes away if I assign the "administer taxonomy" permission to the role I'm having problems with. I'm pretty sure that means that it's not a TAC issue.
Comment #2
KarlKedrovsky commentedI lied, it does look like a TAC issue. I removed the "administer taxonomy" permission and disabled TAC module and the problem went away. Here's a little more info. The view is a block view with a view type of "full nodes". The block is displayed on every page and displays correctly on every page that doesn't have a URL that starts with "node/add". Every URL that that does not start with "node/add" seems to work just fine. The block needs some special processing in template.php so I added a bit of debugging code and found that on the "node/add" pages the node does not have any taxonomy terms ($node->taxonomy) associated with it and taxonomy_node_get_terms() returns nothing. On other pages both of these return the expected taxonomy terms.
I've tried the latest 5.x-1.x-dev version without any luck and I've been checking and double checking everything I can think of. Does anyone know what the issue might be or what I can to in order to better diagnose the problem?
Comment #3
cpugeniusmv commentedDoes this problem also occur with 5.x-2.x-dev ?
Comment #4
KarlKedrovsky commentedI just tested with 5.x-2.x-dev and the problem still occurred.
Comment #5
xjmClosing since this issue has probably been worked around by now, and since Drupal 5 support is ending. Please open a new issue if this occurs with a current (6.x) release of TAC.
Comment #6
elBradford commentedI'm running into this issue with Drupal 7. Unless I give the role "Administer vocabularies and terms" they cannot see the taxonomy fields when they're creating a node and therefore cannot create a node because they are required fields.
Comment #7
xjm@elBradford: You need to grant the role Add tag permissions to see the field. Please open a separate issue if you need further support.
Comment #8
elBradford commentedThanks, opened new issue #1301874: Taxonomy Fields not present unless user has "Administer vocabularies and terms" permission