Views filter for Workbench access sections not working and throwing error.

Warning: array_keys() expects parameter 1 to be array, null given in workbench_access_handler_filter_access->query() (line 98 of /............................/sites/all/modules/workbench_access/includes/workbench_access_handler_filter_access.inc).

Comments

technikh’s picture

actually works if this option is unchecked.

Allow multiple selections
Enable to allow users to select multiple items.
agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

Please define the problem more clearly. I don't understand the steps to replicate.

technikh’s picture

Status: Postponed (maintainer needs more info) » Active

add the workbench access filter in a view, expose it and check "Allow multiple selections". The error shows up on the output page.
also the field allows to multi-select even if "Allow multiple selections" is not checked.

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

"Allow multiple selections" on the Workbench Access settings or the View settings?

On the WA settings, that only applies to the node editing form.

technikh’s picture

Status: Postponed (maintainer needs more info) » Active

View settings

agentrickard’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

I see that #multiple is hardcoded to TRUE in any event, ignoring the Views setting, which is why this breaks.

For now, leave that selection unchecked.

agentrickard’s picture

This filter, btw, is not meant for anything other than administrative use.

technikh’s picture

Yes. want to give the content admin a way to filter by sections. [building sections from Menu]

agentrickard’s picture

The way this is currently designed -- which is admittedly backwards -- is to not add the filter to your view but to tag the View with "Workbench" and then the filter is added for you.

This is goofy, admittedly, and fixing this issue would have to be part of changing that logic. So my advice for now is either a) uncheck that option; or b) remove the filter and use the tag instead.

technikh’s picture

Thanks agentrickard
It works for my use case. as I commented out in #1 I unchecked that option and anyway I wanted my client to filter by multiple sections.

technikh’s picture

also I don't know if this has to be opened as a new bug but
I get below error because my view has workbench filter with sections of menus more than 100 items
Error: Maximum function nesting level of '100' reached, aborting!

Drush command terminated abnormally due to an unrecoverable error.                                                                                [error]
Error: Maximum function nesting level of '100' reached, aborting! in
/......................./docroot/sites/all/modules/views/views.module, line 955
agentrickard’s picture

I think that is separate. I've never seen that before. Please export your View into the other issue.

agentrickard’s picture

Status: Active » Postponed