Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Replicate D7 default argument for memberships #254

Open
tombola opened this issue Apr 13, 2017 · 3 comments
Open

Replicate D7 default argument for memberships #254

tombola opened this issue Apr 13, 2017 · 3 comments

Comments

@tombola
Copy link

tombola commented Apr 13, 2017

We have the requirement to show recent content in a view from all of the groups that the current user is a member of.

This requires a default argument to populate the contextual filter (for groups_audience) used by the view. In D7 this was provided by og_plugin_argument_default_user_groups.inc, but the equivalent does not seem to be present in D8 version.

Pull request #253 supplied to add the default argument.

@drupalninja
Copy link

When I add this as the default I get a page not found.

@MPParsley
Copy link
Collaborator

Hi @drupalninja, could you provide some more information?

In the argument it's possible to configure the behavior when there are no results, this might trigger the 404?

@drupalninja
Copy link

I used the default setting for that contextual filter but it never actually works in preview or on the page even though the logged-in user has memberships to the group. Maybe a screenshot of how you are using it would let me know if I am doing it right?

I ended up taking a different route and just adding relationships to the views.inc file from another issue I found to do what I needed to get done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants