We have set up taxonomy terms to be groups for all sorts of awesome and cool reasons. But the OG Vocab widget didn't find the context until I patched og_context.module with #2038575: "node" group types are the only context that can be automatically detected and passed the correct target type (taxonomy_term in my case) to og_context() in og_vocab_get_accessible_vocabs().

I'm not sure how/if this is related to #2007730: Integrate with OG-context to limit Og-vocab

CommentFileSizeAuthor
#1 2038589-pass-group-type-1.patch678 bytesdixon_
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dixon_’s picture

Status: Active » Needs review
FileSize
678 bytes

Here we go.

dixon_’s picture

Title: Widget doesn't find vocabularies for groups other than nodes » OG Vocab widget doesn't find context for group types other than node

Clarified title.

dixon_’s picture

Issue summary: View changes

Added possible duplicate/related issue.

amitaibu’s picture

Status: Needs review » Fixed

Hi dixon_, welcome to the queue ;)
Committed, thanks.

amitaibu’s picture

Status: Fixed » Needs work

Sorry, I've reverted this commit. The only fields sent to og_vocab_get_accessible_vocabs() are the taxonomy reference fields, so it will always be the taxonomy term, never a node (which is the typical use case).

I believe we'll have to figure out a solution for you need, in that other issue you opened in OG ;)

dixon_’s picture

Status: Needs work » Needs review

The only fields sent to og_vocab_get_accessible_vocabs() are the taxonomy reference fields, so it will always be the taxonomy term, never a node (which is the typical use case).

I don't fully understand what you mean. og_vocab only uses entity reference fields, so it should always be a entity reference field being passed to og_vocab_get_accessible_vocabs(), right?

And to find the right group context, we must pass the right group type to og_context(), i.e. the entity type your group field is referencing. It works without passing entity type to go_context() if you're looking for node groups. But once you setup taxonomy terms to be groups you're getting screwed by og_context() since it assumes you're looking for nodes ;-)

dixon_’s picture

Issue summary: View changes

Flushing filter cache to update referenced issue title.