When trying to edit/create a node that has an entity reference field of type og_vocabulary, I get the following error:
EntityMetadataWrapperException: Unknown data property og_vocabulary. in EntityStructureWrapper->getPropertyInfo() (Line 339 of /drupal/sites/all/modules/entity/includes/entity.wrapper.inc).
What I did:
- Create a OG group node type
- Create a group (admin is group manager)
- Create a node type FOO to be related to the group (has an audience field)
- Create a group taxonomy (group/node/NID/admin/taxonomy) and enable it for nodes of type FOO
- Add a field to type FOO: field is entity reference, widget is OG vocab, . (Required field, 1 value, target type: OG vocab; Entity selection mode: simple; don't sort; )
Update:
Fixed the order above.
The bug seems to be related to the widget. If I choose another one, I can edit/add nodes of type FOO, but it does not make much sense, because I can only choose no term or an empty term.
Comments
Comment #1
SeicherlBoB commentedOK, obviously that was not a bug.
The reason for this "bug" was the missing field "og_vocabulary". This field needs to be added via OG field settings (
admin/config/group/fields).By doing so, the type FOO gets the field "og_vocabulary" in the administer fields configuration dialogue. This needs to be edited/configured instead of defining a new one like I did initially.
Still, it should be documented how to use it, so I keep the bug open for component documentation.
Comment #2
amitaibuOG-vocab will throw a form-error.
Comment #3.0
(not verified) commentedUpdate:
Fixed the order of reproduction steps, added info about the bug