When we have to show content related to a specific user, we use Drupal’s permission system shipped with it and it certainly does the job, but there was this one time when i had to show a simple View of a list of a logged in user’s articles.
Apparently for advanced users it must be a simple job. i.e. setting the permission of content type from Permissions section. Well, i googled and that is exactly what i had to do but it still won’t show the unpublished nodes. This was quite frustrating since there was nothing related to unpublished node type in the permissions section.
But after some search i cam upon a response on stackoverflow that said something about SQL Rewriting and View. So i tried this one solution that did the job for me and disabled SQL Rewriting in the Query Settings of the view under the Advanced section. And voilà: listing served!
Turns out the real reason was the node_access which the Views use to check access rights but unpublished nodes are removed from this table somehow.
Latest posts by alexey (see all)
- Zend Soap NULL Reponse - August 29, 2018
- Quick Facts About WooCommerce - April 25, 2018
- WordPress stuck on a “Too many redirects” error loop when using SSL - January 17, 2018