Views filtering on Workbench access: access filter doesn't bring in selected section

I have set up workbench access using taxonomy.

I want to filter content in a View based on the taxonomy selection in a content type.

Content type: Promo message
Workbench access section taxonomy options: study, current students
I create two views of content type promo message.
I want to filter each view by workbench access: access filter.
View 1. filtered by workbench access: access filter: "study"
View 2: filtered by workbench access: access filter: "current students"

I want to display one view on a study section and the other on current students

Steps when adding the workbench access: access filter in:

1. In views click Add filter criteria
2. select Workbench Access: Access filter
3. under operator there is only "Is one of" option
4. Under Sections I select "study" as one of the options
5. Click apply

In the Filter Criteria list, workbench access appears as:

Workbench Access: Access filter (=)

and it displays an error at the top:

Warning: Illegal offset type in unset in views_handler_filter_in_operator->admin_summary() (line 313 of /data/law/sites/all/modules/contrib/views/handlers/

My selection of "study" or "current students" doesn't appear for the filter criteria to filter on.

I saw a similar issue to this for Workbench access development version 7.x-1.x-dev I have done research but it doesn't appear anyone else is having this issue with the current stable version


fionamccaskill’s picture

Issue summary: View changes
agentrickard’s picture

What version of PHP are you running?

dgtlmoon’s picture

Looks like a bug or the API has changed, $this->value returns a single value on nothing selected and a single or an array of values when selected.

dgtlmoon’s picture

Status: Active » Needs review
dgtlmoon’s picture

Last one gave a warning, $this->values is always an int when not set, so we go with that.

jiv_e’s picture

I have the exact same warning. It appears when I have "Workbench Access: Access filter (=)" in use. Everything seems to work correctly, though. I have a different setup. It filters content based on current users workbench access permissions.

The latest patch didn't remove the warning and on the actual view page i now get...

Warning: array_flip(): Can only flip STRING and INTEGER values! in workbench_access_build_tree() (line 1246 of /var/www/clinic/drupal_root/sites/all/modules/workbench_access/workbench_access.module).

I'm using PHP7 Workbench_access-7.x-1.5 (and this patch

agentrickard’s picture

Patch isn't working for me. Looking at solutions.

Warning: array_flip(): Can only flip STRING and INTEGER values! in workbench_access_build_tree() (line 1246 of /Applications/MAMP/htdocs/workbench7/sites/all/modules/workbench_access/workbench_access.module).
agentrickard’s picture

This seems to work. I'm running PHP 7.1 right now.