4

I have added new field to my bundle in one of entity type. I used the Group audience as field type and Group Audience as widget type. This is to make the field to select multiple records.

While adding the new record with all the values it gives following error:

EntityMetadataWrapperException: Unknown data property og_membership. in EntityStructureWrapper->getPropertyInfo() (line 354 of /var/www/vhosts/test1.3blmedia.com/httpdocs/sites/all/modules/entity/includes/entity.wrapper.inc).

I am not getting where it is wrong. Any hints?

2
  • Are you using og_audience module? It is quite old so probably not support entity metadata wrapper.
    – Jimmy Ko
    Jan 23, 2017 at 11:24
  • @JimmyKo Yes I am using Group Audience Widget but it is working well in other modules Jan 23, 2017 at 12:16

2 Answers 2

2

Please login to admin and go to following page. You need to add field for your bundle. It will resolve above error.

Home » Administration » Configuration » Group Organic groups field settings

For more details please visit following link. https://www.drupal.org/node/2023721

0

If it is a custom field that you have defined in your module (using hook_field_info()) then you need to add a property_type to your field info. See https://www.drupal.org/docs/7/api/entity-api/property-info-for-fields for an example and https://www.drupal.org/node/905580 for a full list of possible types.

If your field is a complex (multiple value) data structure you may also additionally need to include property_callbacks as well. See http://d7.thecarneyeffect.co.uk/describe-field-properties-make-custom-fields-work-entity-metadata-wrappers for a good example of this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.