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)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nagy.balint’s picture

Patch attached.

Denes.Szabo’s picture

Thx! It seems fine!

ezra-g’s picture

Status: Needs review » Reviewed & tested by the community

In 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.

amitaibu’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

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