0

I have a content type called "Stuff". Which has a taxonomy term called "Area". There are three Areas: A, B and C. I have a view that lists the content. The problem is, I get duplicates based if a node is assigned to multiple terms.

So for example, if I have three nodes, each assigned to ONE taxonomy term, I end up with:

Stuff 1 | A
Stuff 2 | B
Stuff 3 | C

But if I assign a node to multiple terms I end up with:

Stuff 1 | A
Stuff 2 | B
Stuff 3 | C
Stuff 4 | A, B, C
Stuff 4 | A, B, C
Stuff 4 | A, B, C

I've tried:

  • Going under ADVANCED --> OTHER --> QUERY SETTINGS --> DISTINCT ...

Any ideas what could be causing this?

UPDATE

If I use aggregation, I get:

Stuff 1 | A
Stuff 2 | B
Stuff 3 | C
Stuff 4 | A
Stuff 4 | B
Stuff 4 | C

But I want:

Stuff 1 | A
Stuff 2 | B
Stuff 3 | C
Stuff 4 | A, B, C

What am I missing?

0

Use aggregation. It's just above query settings.

  • I tried that. Didn't work. See update in my answer and the result I get. – coderama Jul 13 '16 at 20:18
0

What about grouping?

Format > Settings > Grouping Field

And then try grouping by title (or whatever field "Stuff 1" is).

I quickly tried this and it reduces duplicates although the formatting is a little weird so you will have to adjust that somehow

  • No. All I get now is the three terms below a header. I want drupal to see them as one. Which is why I do believe aggregation should be what solves this, but it doesn't. Will keep looking... – coderama Jul 21 '16 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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