We got the following notice while reverting og permissions:
Notice: Undefined property: stdClass::$name in og_role_save() (line 2472 of ...og/og.module).
It turned out that in the og_features_permission.features file at line 134, the parameter for the og_role_save() function is wrong.
Because the $details variable contains all the roles for a given permission (names only with key "roles"), while the og_role_save wants a role object with ->name, ->gid, ->group_type, and ->group_bundle properties to be able to add the role, and should only get the role that has to be added (so the one that is not in the system already, and not all of them anyways)
Comment | File | Size | Author |
---|---|---|---|
#1 | fix-role-creation-on-feature-import-1800964-1.patch | 642 bytes | nagy.balint |
Comments
Comment #1
nagy.balint CreditAttribution: nagy.balint commentedPatch attached.
Comment #2
Denes.Szabo CreditAttribution: Denes.Szabo commentedThx! It seems fine!
Comment #3
ezra-g CreditAttribution: ezra-g commentedIn my testing this allows a feature module to revert its exported og_permissions without error. We're now using this patch in Drupal Commons 7.x-3.x.
Comment #4
amitaibuCommitted, thanks.