With OG set up, I go to admin/config/development/generate/user to generate some dummy users.

The process crashes with this error:

Error message
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7694 of includes/common.inc).

Here's a trimmed summary of the backtrace:

-user_save()
- field_attach_insert()
- entityreference_field_insert()
- OgBehaviorHandler->OgMembershipCrud()

This then calls og_group(), and the problem seems to be that the $gid parameter is a group node type, rather than as the docs say:

 * @param $gid
 *   The group entity or ID.

Comments

joachim’s picture

The $diff at the top of OgBehaviorHandler->OgMembershipCrud() is incorrectly:

array (
'insert' => array (
   0 => 'node_type_A',
   1 => 'node_type_B', 
), )

where those are the two types of node that are groups.

And that is caused by groupAudiencegetDiff() getting an $items param that looks like:

  0 => 
  array (
    'target_id' => 'node_type_A',
  ),
  1 => 
  array (
    'target_id' => 'node_type_B',
  ),
)