Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I just installed the 7.x-1.1+4-dev version of the module in my test environment. I have a user that can access all published content and only blog post unpublished content. I logged in as the user and accessed the Content page (/admin/content), then selected status = not published and clicked the filter button. All blog posts displayed, both published and not published.
Thank you. Ann.
Comment | File | Size | Author |
---|---|---|---|
#6 | view_unpublished-content_overview_filter_fix.patch | 2.68 KB | toelli |
Comments
Comment #1
ann b CreditAttribution: ann b commentedComment #2
ann b CreditAttribution: ann b commentedCore is setting the status field to published.
file: node.admin.inc
function: node_admin_nodes()
This code is called after the status field from the filter on the Content Overview page is added to the query (or not if the value is set to any). This appears to be a bug. Then the view_unpublished module removes any status conditions it finds in the query. It used to remove the status field only if it was the second to last condition in the query. It seems to be trying to determine which condition was added by node_admin_nodes() .
Does anyone have any insight on this? Have the maintainers decided to show all of the content the user has view_unpublished rights to, regardless of whether or not it's published? Then the filter status field is ignored?
Comment #3
ann b CreditAttribution: ann b commentedSummary:
Drupal Core 7.27
file: node.admin.inc
function: node_admin_nodes()
View Unpublished Module 7.x-1.1
file: view_unpublished.module
function: view_unpublished_query_alter($query)
Issue: Unpublished content does not show up for regular users.
View Unpublished Module 7.x-1.1+4-dev
file: view_unpublished.module
function: view_unpublished_query_node_access_alter($query)
Issue: The status field setting on the Content Overview Page is ignored.
Comment #4
irmela CreditAttribution: irmela commentedHey there,
I'm having the same Problem. Would be great if there would be a patch to solve it.
Thanks!
Comment #5
ann b CreditAttribution: ann b commentedWe used views to created a separate page to find blog posts. It looks very similar to the Content Overview Page, and took less than 15 minutes to create. We created a view displayed as a page, selected the table format, and used exposed filters. Now our blog post users can filter the blog posts and view published and/or unpublished posts. We added some other filters as well.
Comment #6
toelli CreditAttribution: toelli commentedI looked into this problem and this patch i wrote should fix this.
Comment #7
entendu CreditAttribution: entendu commentedThis looks like a dupe of #1192074. I am applying a fix there.