Closed (fixed)
Project:
Open Atrium
Version:
7.x-2.31
Component:
Archive App
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2015 at 00:21 UTC
Updated:
27 Mar 2015 at 00:54 UTC
Jump to comment: Most recent
Comments
Comment #1
paean99 commentedI think that archived content are in fact flagged content with the 'trash flag'.
In fact the OA archive module is supported by the Trash Flag module, or so i think.
I do not know about the search api on its own and his relation to Flags, but it should be possible to use the Views integration with Search API and exclude the trashed/flagged content (if not already done natively).
Comment #2
nrackleff commentedHmmm. I do not see the Trash Flag listed in the available fields or list of filters when I am creating a Database Node Index view through the views UI. I have Open Atrium Archive turned on in features. Do I need to do something else to make it available to the views UI?
Comment #3
paean99 commentedIt seems that search api has a special relationship with drupal permissions.
https://www.drupal.org/node/1254452#search_api_node_access
There is here some permissions problem, possibly related to Views does not respect hook_node_access or some misconfiguration on the view.
I think that a quick fix for your case could be achieved by enabling 'Exclude unpublished nodes' on the Node Index search filters.
You might have to reindex it.
Comment #4
mpotter commentedSounds like (and based on another issue you posted) that the oa_archive module is not enabled on your site. This module modifies queries to prevent archived content from appearing.
To add it to a custom view you need to add a Relationship with Flags. See the Recent Content view in Open Atrium as an example view that doesn't show archived content.
The search views that come with OA2 in oa_search already have this ability, so maybe you haven't reverted your search to use these views.
Comment #5
jkingsnorth commentedDid mpotter's suggestion help?
Comment #6
nrackleff commentedYes, that does seem to have helped. People who do not have permission to see archived content are now not seeing it in the search results. I'm still a little confused about archiving in general. What is the purpose of archiving? How is it different than 'unpublish'? Why would someone choose one over the other for a piece of content?
Comment #7
nrackleff commentedNo wait, I take that back. It is still showing up in search results for people who are not allowed to see archived content. But, that may have something to do with the other issue where I have turned off all archive related permissions for everyone but admin and users are still seeing the archive this button on content when they should not see the button. Not sure which is the real problem. https://www.drupal.org/node/2449005 If a user sees a piece of authenticated content in a search result and clicks on it, they do get an access denied message and cannot view the content. This is the default search results view, not a view that I created.
Comment #8
jkingsnorth commentednrackleff: After you've changed teh permissions make sure you rebuild permissions in Reports > Status. And you will probably have to re-build your search index as well. (Not sure exactly where that is off the top of my head. In Configuration > somewhere.) Because all the old items might still be indexed. This sounds like an issue I've seen here before, but I couldn't find it, sorry. In that case completely rebuilding the search index fixed this issue.
Comment #9
nrackleff commentedIt seems to have worked.
I do still have the problem of users who do not have permission to archive things still getting the "archive this" option, but that is under https://www.drupal.org/node/2449005 so I think we can consider this one closed. Thank you all for your help with this.
Comment #10
jkingsnorth commentedGreat, lets close this and focus efforts over there then.