Closed (fixed)
Project:
Workbench Access
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
20 Sep 2011 at 05:33 UTC
Updated:
16 Apr 2012 at 11:57 UTC
Jump to comment: Most recent file
I set up a taxonomy and an access scheme as described in the documentation and selected all content types to have WA enforced. All users have been added to different sections and can create content accordingly.
I can setup views with filters restricting to the content of one section, but it shows the content of all sections. Filtering a view to a certain section works only if an exposed filter is used.
Here is what the views-preview shows as databas-query:
SELECT node.created AS node_created, node.nid AS nid
FROM
{node} node
WHERE (( (node.status = '1') AND (node.nid IN (SELECT DISTINCT workbench_access_node.nid AS nid
FROM
{workbench_access_node} workbench_access_node
WHERE (workbench_access_node.access_id IN ('department', '1', '2', '9', '8', '10', '11', '12', '14', '13')) AND (workbench_access_node.access_scheme = 'taxonomy') )) ))
ORDER BY node_created DESC
LIMIT 10 OFFSET 0
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | wba-views-filter-1284680-7.patch | 1.67 KB | fearlsgroove |
Comments
Comment #1
agentrickardInteresting. Our only use-case has been for an exposed filter, so that's likely why we never saw this behavior.
Which version of Views are you using?
Note: better title.
Comment #2
ronny89 commentedViews is version 7.x-3.0-rc1
ctools is version 7.x-1.0-rc1
i'll try another WA-setup with default sections from scratch now and give feedback whether it works.
thanks for tightening the title. :-)
Comment #3
ronny89 commentedit's the same with the example configuration.
here, Exhibits Visiter and Exhibits Staff (explicitly) are chosen as filter, but content assigned to other sections is also shown:
Comment #4
agentrickardThanks. I suspect that we're only applying to exposed filters, so we need to take a look at how that filter handler operates.
Comment #5
robeano commentedLet's see if we can get this fixed. Assigning to @stevector
Comment #6
ronny89 commentedwith #1187424: Default taxonomy form support i can create views with desired results.
Comment #7
fearlsgroove commentedThis is broken for non-exposed forms because it relies on trickery with the form fields instead of a simple 'value' field. I've attached a patch that fixes it by assigning the value based on the access_id setting in an init() override, which also required I define get_value_options(). It works with both exposed filters and explicit non-exposed filters, but I don't fully grok the intent of the trickery I'm working around, so this may bear some additional rethinking.
Comment #8
agentrickardConfirmed. Thanks!
Committed.
Comment #9
agentrickardComment #11
Lehtóri commentedAfter applying the above patch, i get the following warning at my views config page. The view itself seems to work fine though.
Warning: Illegal offset type in unset in views_handler_filter_in_operator->admin_summary() (regel 304 van <path to drupal>/sites/all/modules/views/handlers/views_handler_filter_in_operator.inc).