Bug introduced in 7.x-1.4 version.

When trying to create a membership programmatically, with og_group(), I can't set a custom membership_type. It's always forced to OG_MEMBERSHIP_TYPE_DEFAULT, due to wrong key.

The received 'membership_type' go to $values['name'], but the membership is created with $values['type'] data, which is never set. ( So OG_MEMBERSHIP_TYPE_DEFAULT by default).

Bug was introduce by commit ab321e5a22d8a2bebb78650e1ba21dc3dc2a6bbe when playing around issue #1263588.

Currently making a patch, I upload it in a comment, in order to have the issue number

Comments

opi’s picture

Here is the promised patch

opi’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, wrong_key_name_in_og_membership_create-1719264-1.patch, failed testing.

BassistJimmyJam’s picture

I ran into this issue as well and the patch in #1 resolved it for me. Queuing a re-test as the failed test passed for me.

BassistJimmyJam’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, wrong_key_name_in_og_membership_create-1719264-1.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: wrong_key_name_in_og_membership_create-1719264-1.patch, failed testing.