Nodes beloging to multiple groups appear in Views as many times as current user's memberships

Created on 28 November 2023, 10 months ago
Updated 6 December 2023, 10 months ago

Problem/Motivation

Nodes beloging to multiple groups appear in views many times, if user is member of more than one of these groups.

Steps to reproduce

On a fresh install:

  1. enable Group and Group Node.
  2. create a new group type "Generic"
  3. enable content type Page for that group
  4. create two groups of "Generic" type: "GroupA", "GroupB"
  5. create a new Page content "Test"
  6. create a new View on nodes, with a page display, insert path (ex. "/test"), leave all to defaults
  7. add "Test" node to "GroupA"
  8. add a new user "UserA" and add to "GroupA" members
  9. as UserA visit /test views page, there is only one node instance
  10. now add "UserA" to "GroupB" members
  11. again, as UserA visit /test views page (maybe you need to clear cache or save view). Now you see the "Test" node two times

Please note that the view hasn't any relationship, so i see that duplication as a bug.
I expect to see only one occurrence of every node that user has access to as per 1.x branch.

Proposed resolution

Flagging "Distinct" on views query settings can be a workaround but it is not a solution, expecially for more complex queries.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.2

Component

Code

Created by

🇮🇹Italy maurizio.ganovelli Arezzo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024