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.

Files: 
CommentFileSizeAuthor
#4 og-entity_without_content_views_relationships-1781666-4.patch658 bytesspotzero
PASSED: [[SimpleTest]]: [MySQL] 739 pass(es).
[ View ]
#2 og-entity_without_content_views_relationships-1781666-2.patch659 bytesspotzero
PASSED: [[SimpleTest]]: [MySQL] 723 pass(es).
[ View ]
#1 og-entity_without_content_views_relationships-1781666-1.patch659 bytesspotzero
PASSED: [[SimpleTest]]: [MySQL] 723 pass(es).
[ View ]

Comments

StatusFileSize
new659 bytes
PASSED: [[SimpleTest]]: [MySQL] 723 pass(es).
[ View ]

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.

Status:Active» Needs review
StatusFileSize
new659 bytes
PASSED: [[SimpleTest]]: [MySQL] 723 pass(es).
[ View ]

Setting status to needs review.

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 &&

StatusFileSize
new658 bytes
PASSED: [[SimpleTest]]: [MySQL] 739 pass(es).
[ View ]

Here's the corrected patch.

Thanks.

Status:Needs review» Reviewed & tested by the community

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

Status:Reviewed & tested by the community» Fixed

Committed, thanks.

Status:Fixed» Closed (fixed)

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