2

I have a Drupal 7 site where users have a listing they can edit.

This all works fine when the listing is published but as soon as it's set to unpublished they can't view the page or the edit page.

They've got all the relevant permissions:

View own unpublished content Edit own content

I've even got the Override Node and View Unpublished modules installed but still I get the page trying and trying to load but never actually loading.

As soon as I set it to published it's all fine.

Open to any ideas.

Thanks

3
  • I've used the drupal.org/project/publishcontent module in Drupal 6, there is a version of it available in Drupal 7, but I've not used it.
    – Jimajamma
    Mar 6, 2012 at 16:29
  • Sounded promising but it won't let the role view unpublished content...
    – SpaceBeers
    Mar 6, 2012 at 16:45
  • I actually just have the 'authenticated' user role have the 'View own unpublished content' permission and have had no issues like yours. None of my editors have 'administer content' or 'bypass content access controls', but can see their unpublished content. I'm assuming you've done this a thousand times, but just want to check that you've tried clearing cache, rebuilding permissions, etc? And do you have any special modules installed that may be hijacking the regular Drupal permissions? Dec 4, 2012 at 1:42

4 Answers 4

1

That is how the permission system is setup for Drupal nodes. Users need some super user permission to be able to edit unpublished nodes (administer content I believe it's called), not very practical. You could instead make a custom form that allows users to publish their own content or create a custom node access function for editing nodes.

3
  • Really? Even though I can set the role to be able to edit their own content etc, they won't be able to view their own unpublished content? Do you know any modules (other than the mentioned) that would help?
    – SpaceBeers
    Mar 6, 2012 at 14:33
  • @SpaceBeers Most node access modules would add a lot of unnecessary complexity. I haven't heard of a module that just changes this behavior.
    – googletorp
    Mar 6, 2012 at 15:11
  • I know this question is a bit old, but check the code @ drupal.stackexchange.com/questions/30750/… Jan 11, 2013 at 17:31
2

For me, the solution was to enable the "Bypass content access control" permission setting. In my case it was for an internal role, so I was comfortable with that but some roles I would not give that to.

I am running Drupal 7, BTW.

3
  • "Bypass content access control"
    – monymirza
    Dec 4, 2012 at 5:53
  • 1
    @monymirza, I don't understand your comment.
    – zkent
    Dec 5, 2012 at 6:30
  • It's a permission under node category for user roles. Jun 20, 2014 at 13:36
0

"Bypass content access control" only comes into play in a view. You can give someone permission to view their own unpublished nodes, but they will still not see those nodes in a View unless, in that specific view, you select
"Bypass content access control".

0

I had to create a view "Unpublish" in View module and Module: publishcontent and view_unpublish works perfectly. Solves the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.