I have a User view where I list user information with contextual filter UID. I want to display all the terms from the nodes that the user added. I added the Author relationship so that way I can display the terms field to the view.

The issue is that the field only displays the terms of the first node added by the user. The aim is to display all the terms of all the nodes added by the user. Preferably with no repetition.

So if user U added node A with term X and Y and also added node B with term X and Z, the views filed should display term X, Y and Z.

What am I doing wrong that only the user's first node's terms display?


It's not likely you have it working the way you describe it, even for one node.

You need to first connect the users to the nodes, before you can make further connection to terms on those nodes.

The easiest to create such views is through Taxonomy term type, not User type, since it's the terms you want to list in the end:

  1. Create Taxonomy term Views with 0 Pager (to show all items)
  2. Under Fields add Taxonomy term: Name if you don't have it already
  3. add Relationship Content using field_[name], require it
  4. Add another Relationship Content author, require it (it will automatically use the first Relationship)
  5. Add a Contextual filter User ID, it will automatically use the author Relationship, and configure it:
    When the filter value is NOT available
    Provide default value
    User ID from route context
    When the filter value IS available or a default is provided
    Specify validation criteria
    User ID
    Single ID
    Hide view
  6. Turn Aggregation on.

To test the views enter a user ID into the Preview field, it should show a list of terms associated with the user's node's field you added the Relationship for.

Aggregation takes care that there are no duplicates in the results.

|improve this answer|||||
  • Works like a charm! Thank you prkos! So much to learn about views... I really grasped this from the wrong direction it seems. – ventura Feb 16 '19 at 21:30

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.