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.

CommentFileSizeAuthor
#2 Create Post | Site-Install-1.jpg31.34 KBamitaibu

Comments

SeicherlBoB’s picture

Component: Code » Documentation

OK, 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.

amitaibu’s picture

Title: Unknown data property og_vocabulary » Give warning if OG vocab widget used on wrong field
Status: Active » Fixed
StatusFileSize
new31.34 KB

OG-vocab will throw a form-error.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Update:
Fixed the order of reproduction steps, added info about the bug