My apologies if this is basic, I'm experimenting with OG and I can't seem to get what I feel should be a common use case to work.

I want to make a taxonomy vocabulary the bundle that I use to make groups. (Lets call it "Group Terms").

1) Create "Group Terms" taxonomy vocabulary
2) Since there is no "organic groups" tab on the create taxonomy page like there is on a node, I discovered the og group field can be added under configuration -> og field settings. I add a group field to the vocabulary here
3) Shouldn't I start seeing a 'groups' tab for the taxonomy here just like I would if I had made a content type a group?

CommentFileSizeAuthor
#3 1722328-og-terms-path-3.patch1.06 KBamitaibu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelcollinsdc’s picture

Can anyone comment if taxonomy groups are supposed to work in the 2x branch?

KarenS’s picture

Title: Making any entity a group (taxonomy for example) is supposed to work the same was a node? » Taxonomy groups have no 'group' tab
Category: support » bug

This is a bug. The problem is this code in og_ui_menu():

  foreach (og_get_all_group_entity() as $entity => $value) {
    $items["$entity/%/group"] = array(
      'title' => 'Group',
      'page callback' => 'og_ui_group_admin_overview',
      'page arguments' => array($entity, 1),
      'access callback' => 'og_ui_get_group_admin',
      'access arguments' => array($entity, 1),
      'type' => MENU_LOCAL_TASK,
      'file' => 'og_ui.admin.inc',
      'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    );
  }

This is the code that creates the 'group' tabs. It is assuming it will create a path of $entity_name/$id/group for all entities. That works fine for nodes and users, does not work at all if the entity is 'taxonomy_term'. In that case the path is wrong, and so are the arguments. And it will be wrong for any other entity that any different path that the expected one.

There may be other menu items making incorrect assumptions about paths, but this is the one that keeps the 'Group' tab from showing up.

I don't know the best way to fix it generically, to work for all types of entities.

amitaibu’s picture

Status: Active » Needs review
FileSize
1.06 KB

I don't know the best way to fix it generically, to work for all types of entities.

Yes, this came in the past a few times. I think since terms are from core, we should do the special handling ourself.

amitaibu’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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