This drupal page, http://drupal.org/node/1106606, says that for Drupal 7 to allow users to view their own unpublished content to check "view own unpublished content" in permissions.
I have this checked, yet when someone clicks on 'admin/content' it says permission denied. Of course I don't want to give them permissions related to admin content.
Currently I have the `override node options` module enabled, and when a user unpublishes their content, they can no longer get back to it to continue editing and then publish it.
I cannot use the 'view unpublished' module as many threads suggest as it gives an entire role access to all unpublished content related to that role.
What I am leaning towards is a view. Currently I have a very good working block that allows people to view their PUBLISHED content while on their profile page. I cloned this and simply switched the filter "published: yes" to "published: no" and it won't work. I tried setting the view permission to view own unpublished content, and it will not work.
Is 'view own unpublished content' broken in D7? Drupal core says I should be able to allow users to view their own unpublished content. How can I do this without dependency on a 3rd party modules?
Comments
=-=
admin/content is access denied because it is in the admin path and requires administration permissions.
View own unpublished content is not broken. Users should be able to see unpublished content in their tracker. Else you can use views to generate a list. Personally, I'd investigate http://drupal.org/project/workbench
Indeed. "View own unpublished
Indeed.
"View own unpublished content" allows a user to *access* their page itself. But you are correct that *finding* those pages once you have left them hasn't an obvious route in core alone.
It should be (is) possible to provide your own limited alternative to admin/content with view - and I second the suggestion to try 'workbench'. This module/suite provides a lightweight workflow that works well with unpublished states.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Contextual filter
I see similar behavior to you on a page view I created, with similar permissions set regarding view own unpublished content. A workaround that seems to get the right results for me is to add a contextual filter to the view using "Content:Author uid" and setting it to provide a default value "User ID from logged in user".
VIews example
Thanks for the direction so far. I will definitely play with the workbench module. Also, @hbergin and others that have used a view, could you elaborate a bit more on how to successfully configure a view to achieve this? @hbergin, I got a little closer with your hint about providing a default value of logged in user.
I can get the following to work as admin in the views preview, but not in production. Thoughts on why it's not working?
URL has user id
I can see that your view url has a user ID in it, so that will be taken by the contextual filter, rather than providing a default of the currently logged in user. (i.e. /user/1/my-content, if accessed by a different user id, would show user 1's unpublished content)
This might work better for you. Remove the contextual filter, and instead add a filter criteria of type user, using the author relationship, where Current is yes. This should only show the logged in user's unpublished content, regardless of the uid in the URL:
(author) User: Current (Yes)
Here is an export of the view definition you posted above with those changes made: