I'm having a problem where my custom actions produce this error message when my vbo page loaded:

Warning: Illegal offset type in isset or empty in user_access() (line 796 of /XXX/modules/user/user.module).

I tracked this down to line 230 of views_bulk_operations_handler_field_operations.inc:

        $perm = actions_permissions_get_perm($this->all_operations[$key]['label'], $this->all_operations[$key]['callback']);

actions_permissions_get_perm() returns an array, but user_access(), which is run several times on $perm, requires a string.

Comments

dafeder’s picture

StatusFileSize
new793 bytes

Here is a patch that is working so far for me right now... but perhaps I've misunderstood something about the actions api.

dafeder’s picture

StatusFileSize
new1.57 KB

New patch - missed another instance of actions_permissions_get_perm().

bojanz’s picture

Status: Active » Needs review

Haven't used actions_permissions so far, so it's safe to assume it might be a bit broken ;) I'll try to review the patch soon.

bojanz’s picture

StatusFileSize
new1.26 KB

Okay, this issue was caused by http://drupalcode.org/project/views_bulk_operations.git/commitdiff/39ace...
I guess I removed too much.

How does the attached patch sound to you?

bojanz’s picture

StatusFileSize
new1.26 KB

Alternative.

bojanz’s picture

Status: Needs review » Fixed

Committed a variant of #5.

dafeder’s picture

Sorry, bojanz, I didn't have time to test those out, and I can't say I completely understand the code. But I'm sure it's the best solution :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.