3

I have been using OG and Views on Drupal 7. I think it's great but am having one problem. Here's the situation: I am creating views of content, and am wanting to show which group each piece of content is a "member" of. To do this, I bring in a "group membership" relationship and then another group relationship, which then lets me show the GID, title, etc., from the Organic Group.

But here's the problem: as soon as I introduce the "OG membership" relationship into the mix, it begins to show each piece of content twice (or 3 or 4 times) if that content is posted into 2, 3, or 4 groups. I think this is because in the og_memberships table, each membership has its own ID.

What I'd like to do is show each piece of content once, but have a "multiple" type setting on the OG field area, the same way I can show multiple imagefields or Taxonomy terms that are all related to one node.

Anyone got experience with this?

1 Answer 1

1

That sounds more like an issue with the SQL query, called a Cartesian join. It's where you join every row of one table to every row in another table, or to itself, resulting in lots of duplicated rows. Dump the SQL that the View is creating and run it by itself in the database client to see if that's the source of the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.