Needs review
Project:
Group
Version:
3.3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2016 at 14:02 UTC
Updated:
14 May 2026 at 11:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kristiaanvandeneyndeHey joachim, we have this functionality in Group 7 but seeing as views is part of core now, how about we provide some views for Group 8? I was thinking of the one you mentioned here and as soon as we have that views relationship issue committed to Group 8, we could work this out.
What do you think?
Comment #3
joachim commentedYup, using views +1.
Though probably doesn't need to wait that views relationship issue, as it seems to me to be more logical to build this view with a Group base rather than User base, since there's only one user.
Comment #4
kristiaanvandeneyndeYeah you're right, it shouldn't need to wait. I've just had a solution handed to me by dawehner for #2715011: Missing data_table for Group and GroupContent so I should be able to create a full patch for that one really soon. I suggest we tackle this one right after that issue gets fixed. (Because the views will use different base tables once that one lands)
Comment #5
joachim commentedHmm now I've had a go at this, it looks like it *does* depend on #2706495: add Views reverse relationships from entities to Group Content.
- If I base the view on Group, then the available relationships to Group Content are per-group type. That's no good for a view we'd include in the module as configuration. We need the entity_type column on the group_content table so that we can have a relationship from Group -> Group Content where the entity type is 'user'.
- If I base the view on Group Content, there's the same problem with filtering to Group Content that represents a user's membership
- If I base the view on User, which I don't think is the most logical way to do it, I definitely need that other issue.
Comment #6
kristiaanvandeneyndeYeah, thankfully that one will be unblocked rather soon :)
Comment #7
kristiaanvandeneyndeThis is now perfectly possible by adding an exported view (without the UUID!) in config/optional. Will try to fit this in, but feel free to make one yourself.
Comment #8
matslats commentedi'm looking at the group_members view in the latest build.
It adds to the canonical group node a tab called 'members' which lists memberships.
Seems all very proper. But memberships are not what anybody actually wants to see, IMO
I want the same tab with the same name, but which lists users, not groupcontent.
So I'm enclosing a view to replace \Drupal\group\Entity\Controller\GroupContentController AND view group_members with one page group/%/relations called 'Related entities'
It has an exposed filter for the GroupContent types, which by default shows all GroupContent types pertaining to ALL GroupTypes. However this can easily be fixed by extending a views filter.
Comment #9
kristiaanvandeneyndeThe reason we have a non-view version of that page is because Views isn't a hard dependency. I'm all for having the view, but then we need to look at how core swaps out
admin/contentwith a view when Views is enabled.Comment #10
matslats commentedYes Kristian, There is something similar happening with the entity.user.collection route and entity.node.collection routes that when views is enabled they swop out.
That's the secondary question though. The main question is whether you would have all the GroupContent entities showing under one tab, so that site builders can put actual member entities under other tabs.
Comment #11
jidrone commentedHi Everyone,
This can be done by using this patch #2813405: Add a field to view and edit content's groups, which creates a field in the entity types from Group Content Plugins, to get this result just enable the submodule from the patch and then got to "Manage Display" for users and configure the "Group Content" field formatter as needed.
Comment #12
mortona2k commentedThis is easy to do now.
Comment #14
mortona2k commentedThe group permission for view published groups doesn't seem to be granted to a group admin.
This is working for my administrator user, but doesn't work for an authenticated user who is a group admin.
Comment #15
avpaderno