Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#3 | og_is_group_audience_field-1881460-3.patch | 1.19 KB | Slovak |
Comments
Comment #1
eileenmcnaughton CreditAttribution: eileenmcnaughton commentedThere 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)
Comment #2
TechNikh CreditAttribution: TechNikh commentedlooks 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) {
Comment #3
Slovak CreditAttribution: Slovak commentedPatch for checking function_exists() in two places attached.