Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a User view with a VBO field. One of the available options is "Modify OG user roles" (og_user_roles_action).
Relationships are:
OG membership: OG membership from User
(OG membership from user) OG membership: Group Node from OG membership
When selecting users from the view and choosing the action, it results in:
Fatal error: Unsupported operand types in /var/www/sites/all/modules/contrib/views_bulk_operations/views_bulk_operations.module on line 513
Looks like the form isn't able to be fetched from VBO.
The other forms seem to work fine.
Comment | File | Size | Author |
---|---|---|---|
#13 | 1892606-vbo-roles-change-13.patch | 603 bytes | EthanT |
|
Comments
Comment #1
mstef CreditAttribution: mstef commentedLooks like it's ending here:
Comment #2
mstef CreditAttribution: mstef commentedMakes sense, given the way it's set up for the Group admin form. I wonder if we can generalize so it works in all Views (especially because it's available).
Probably not though, since a View showing all group memberships would contain multiple group types, and roles are group-type specific.
Thoughts?
Comment #3
amitaibuCheckout latest RC, there's an integration with OG-context, so it doesn't need to check for a specific argument :)
Comment #4
mstef CreditAttribution: mstef commentedI got the version wrong on here.. I was running that, I just wasn't aware that it needed og_context to work properly.
Maybe the VBO description should make that clear so people don't run into this issue?
Thanks
Comment #5
mstef CreditAttribution: mstef commentedI'm actually still getting the same problem despite enabling og_context. Looks like $og_context isn't being populated. Maybe the view is missing something?
Comment #6
amitaibu> Maybe the VBO description should make that clear so people don't run into this issue?
A patch would be nice :)
Og context is populated according to the Og-context handlers you have enabled, or if you are in a special URL, you will have to write your own OG-context handler.
Comment #7
askibinski CreditAttribution: askibinski commentedDid some debugging, in my case (using the og_context and og 2.0 stable) I found that indeed og_context doesn't get populated and the fallback for views argument gets called, but fails also
This is how $context['view']->args looks like in my case:
So the group_type seems to be missing?
Comment #8
askibinski CreditAttribution: askibinski commented(changed category and version)
Comment #9
liquidcms CreditAttribution: liquidcms commentedis it possible that vbo/actions and og are no longer compatible?
i have:
OG: 7.x-2.0+15-dev (2013-Mar-22)
Views: 7.x-3.6 (latest rel)
VBO: 7.x-3.1 (latest rel)
under Actions i have the configurable action "Modify OG user roles" but wheni try to create an action with this i get the error:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in system_actions_configure() (line 3097 of E:\wamp\www\boma\modules\system\system.admin.inc).
and no config form.
also, under a user view (as mentioned in original post) i have no actions listed under VBO that are related to OG.
Comment #10
liquidcms CreditAttribution: liquidcms commentedhmm.. although i do see this action available under the Group/People tab of a group node - so possibly this is just not available as a generic action?
Comment #11
askibinski CreditAttribution: askibinski commentedStill got this error with OG-3.2 and VBO-3.1
My solution was to patch user_roles.action.inc:
Probably not the best because group_type is hardcoded ;)
Comment #12
drummondf CreditAttribution: drummondf commentedSubscribing to this - group admins have to have a way to manage group roles - I think this is high priority.
I'm in the same boat as everyone else re: versions, etc. Any news here?
Comment #13
EthanTCreating patch file from comment 11 (it worked for me).
Comment #14
chris_h CreditAttribution: chris_h commentedThis still applies and works - would be great to get in place to stop the fatal.
Comment #15
fuzzy76 CreditAttribution: fuzzy76 commentedAs #11 said, it hardcodes the group type. That will break stuff for some people.