In my example I have the following content types:

Department (Group)
Document (Group Content)

After doing more testing with this I believe I can simplify this bug report significantly. In a nutshell, using the documentation found here - if you set up the og_vocabulary field on your "group content" type (Document in my case) and then create your og_vocabularies for each of your groups (Departments in my case) and set those vocabularies up so they are enabled on the document type and also required things don't work as I would expect.

When you go to add a document to one department you'll only see the og_vocabulary terms for that department which is what we want to see. It is also starred as required. However when you try to save the new document it errors out displaying the og_vocabulary term lists for all the other groups you have as well saying you have to supply a value for all of them.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JayDarnell’s picture

Issue summary: View changes
JayDarnell’s picture

Title: Required OG Vocabulary Field with Use Context = "Use if possible" Bug » Required OG Vocabulary Field Requires value for all OG Vocabularies
Issue summary: View changes
Flow1990’s picture

Same problem, when user (Og admin) create groups with associated vocabularies, and when this same user try to add/save a content type (like document) used in his group, all vocabularies appear and they are require, even if i try to bypass them with hook_form_alter

to fix that :

og_vocab.module line 1378

  /*elseif (in_array($use_context, array('yes', 'no')) && !$gids) {
    $gids = og_get_entity_groups('user', $account);
  }*/