1

I have a user view, that needs to list users, sorted by the weight of an taxonomy term associated with the user via an entity reference field and added as a relationship in the view. Once I've sorted by term weight, I next need to sort by the family name field of the user. As soon as I add the second sort I start getting duplicates. How can I accomplish the sort I need without the duplicates?

Turning on aggregation and grouping by the sort AND adding distinct to the query settings works in my simplified version of the view, but once I add in the other things the view won't load with aggregation on.

Update: I thought I had it simplified as far as it could go, but it turns out the relationship has nothing to do with it. I get duplicates just be adding a sort of family name. Curiouser and curiouser.

  • Can you elaborate on what the 'family name field' is? – ratface Jul 13 '16 at 9:19
  • Sure. It is a translatable text field, that holds the user's Family Name. I wonder if I'm getting duplicates because their name exists in two languages... – UltraBob Jul 13 '16 at 9:20
  • 1
    That could certainly be possible - could you try adding a filter to restrict to one language? – ratface Jul 13 '16 at 9:22
  • 1
    You a hero! Adding a filter that familyname language had to be English did it for me. Would you please write it up as an answer so I can accept it? – UltraBob Jul 13 '16 at 9:30
  • @ratface and so I can upvote it. – No Sssweat Jul 13 '16 at 10:01
1

You need to add a filter that restricts family name to one language.

Credit: @ratface, answering this Q as per What should I do when an answer has been added as comment?

| improve this answer | |

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.