I get the following error:

PHP Fatal error:  Call to undefined function og_is_group_audience_field() in /var/www/htdocs/sites/all/modules/entityreference_prepopulate/entityreference_prepopulate.module on line 57

The code seem to be checking for OG being installed:

if (module_exists('og') && og_is_group_audience_field($instance['field_name'])) {
  return entityreference_prepopulate_og_field_default_value($entity_type, $entity, $field, $instance, $langcode);
}

but for some reason this function does not exist in OG:

pseps:/var/www/htdocs/sites/all/modules# find o
oauth/           og/              og_create_perms/
pseps:/var/www/htdocs/sites/all/modules# find og -exec grep "og_is_group_audience_field" '{}' \; -print
pseps:/var/www/htdocs/sites/all/modules#

Organic Groups is installed:
ENABLED: OG create permissions 7.x-1.0
ENABLED: Organic groups 7.x-1.5
ENABLED: Organic groups access control 7.x-1.5
ENABLED: Organic groups context 7.x-1.5
DISABLED: Organic groups field access 7.x-1.5
DISABLED: Organic groups migrate 7.x-1.5
DISABLED: Organic groups register 7.x-1.5
DISABLED: Organic groups UI 7.x-1.5

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eileenmcnaughton’s picture

There is another ticket like this

http://drupal.org/node/1792688

It is closed 7 marked with a duplicate with the message Please see the "OG integration" section in the homepage

(So far I haven't found the duplicate ticket or Og integration section in the homepage (looked on OG homepage & entity reference homepage)

TechNikh’s picture

looks like og_is_group_audience_field function breaks with OG 7.x-1.3

had to add a check to see if function exists in function entityreference_prepopulate_get_values($field, $instance, $validate = TRUE) {

if (module_exists('og') && function_exists('og_is_group_audience_field') && og_is_group_audience_field($field_name)) {
Slovak’s picture

Patch for checking function_exists() in two places attached.