Views OG relationship plugins aren't displayed for entities that have groups, but no group content.

For example, if you have a entity type called "groups" and another entity type called "content", you can't get the relationships to OG membership from the "groups" entity type.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

spotzero’s picture

The attached patch fixes the problem. There is a check that validates all of the avalable entities for views, but only considers them if they are group content.

spotzero’s picture

Status: Active » Needs review
FileSize
659 bytes

Setting status to needs review.

amitaibu’s picture

hi there!

+++ b/includes/views/og.views.incundefined
@@ -65,9 +65,10 @@ class OgMembershipViewsController extends EntityDefaultViewsController {
+    if (empty($group_content_entities[$entity_type]) and empty($group_entities[$entity_type])) {

Minor but and should be &&

spotzero’s picture

Here's the corrected patch.

Thanks.

googletorp’s picture

Status: Needs review » Reviewed & tested by the community

I needed exactly this and the patch provided worked like a charm.

amitaibu’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

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