On our site, users have permission to "View Own Unpublished content," and they can, but only when they are looking at the node page. In any View which is set to display unpublished nodes, the users cannot see those unpublished nodes.

When TAC Lite is disabled, the unpublished nodes display as expected.

CommentFileSizeAuthor
#3 1958862-3.patch1.75 KBgro

Comments

Dave Cohen’s picture

Sounds 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?

valsgalore’s picture

Apologies 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.

gro’s picture

Status: Active » Needs review
StatusFileSize
new1.75 KB

I'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.

Dave Cohen’s picture

Status: Needs review » Needs work

If 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.

Leeteq’s picture

Leeteq’s picture

Version: 7.x-1.0-rc2 » 7.x-1.x-dev
marleo’s picture

Googlers, 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.

valsgalore’s picture

Status: Needs work » Closed (outdated)

I 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!