Closed (outdated)
Project:
Taxonomy Access Control Lite
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2013 at 13:04 UTC
Updated:
22 Mar 2018 at 16:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Dave Cohen commentedSounds like simply how tac_lite is configured. Just because someone creates a node doesn't mean it is tagged in a way that makes it visible to them.
Try publishing one of those nodes. Now does it show up in view?
Comment #2
valsgalore commentedApologies for not seeing your reply sooner!
In answer to your question, yes, people can see the nodes when they are published.
This issue applies to all Views, but as a more specific example, it happens when people are trying to view the list of recent content in My Workbench (using Workbench module), which is set up to show users all the nodes they have created, whether published or unpublished.
Comment #3
gro commentedI'm experiencing the same issue as valsgalore.
With both Workbench and tac_lite enabled users can't see their unpublished content in the Views provided by Workbench (My drafts, Recent Content etc).
If the content is published it appears in those Views.
If tac_lite is disabled users can see their own unpublished content in Workbenches Views.
I used devel_node_access to try and debug and found that no node_access entry was being generated on unpublished nodes. I found this comment that pointed me in the right direction of what the cause was.
Patch replaces the query in _tac_lite_get_terms() with Field API logic, looking for taxonomy reference terms and it seems to resolve these issues.
Comment #4
Dave Cohen commentedIf I understand you correctly, the taxonomy_index table is populated only for published nodes. So it seems the logic of that function could be improved.
However your field api code doesn't look right.
For one thing, not all fields start with "field_". Only those created by field module. I'm sure there's a better way to get all fields associated with the node type. I don't know what it is off hand.
And while I'm no expert in multilingual sites, I think we have to collect the list of tids associated with the node in all languages that drupal knows about. I mean I think a single node can have terms in several languages.
Comment #5
Leeteq commentedPerhaps related:
#1729088: Editing node: node must be saved twice if you are changing the access control.
Comment #6
Leeteq commentedComment #7
socialform commentedI believe this is related to this
http://mbharris.co.uk/content/access-control-module-prevents-view-users-own-unpublished-content
and
https://www.drupal.org/node/1222324
Comment #8
marleo commentedGooglers, the above link (at mbharris.co.uk) apparently mentions a workaround for this problem, but that page is defunct.
The workaround is to go to query settings for that view and check "Disable SQL rewriting". This removes access control checks.
This may be a bad idea in some cases, but if your view is just showing someone their own unpublished nodes, it's probably fairly harmless.
Comment #9
valsgalore commentedI would say since this issue is so old without any progress, and there is a functional workaround, there is no reason to keep it open any more! Thanks to those who responded!