Views filter for group reference entities to display select list all groups available

Created on 20 December 2023, 6 months ago
Updated 16 January 2024, 5 months ago

Problem/Motivation

Running Group 2.2.1 in Drupal 10.1.6 core. I have a entity reference field I created to use in nodes which references the groups the node belongs to. When I create a Search API view and select this field as a filter, I would like it to display all the available groups like this:

But instead, I get this:

What is the process for getting this filter to list all groups for this field, without having to create a custom filter?

Steps to reproduce

Running Group 2.2.1 in Drupal 10.1.6 core. Create a node group entity reference field for assigning nodes to groups:

Create standard Search API fulltext view following this guidance:

https://www.drupal.org/docs/7/modules/search-api/getting-started/search-... β†’

If you add the node group field entity as a filter, it does not give you the ability to display all available groups to the user. You can only enter in the group label you are looking for (only one). I would like to be able to select multiple groups from a select list.

Proposed resolution

When I add the node group field as a views filter, I should see all available groups as options:

I did create a custom views filter for groups, but as search api views are do not use the Drupal database, I really need the groups added to the filter on the front end. The way it appears to work automatically for the Taxonomy terms views filter:

So, I don't know if this is just a configuration step I have missed or what.

Remaining tasks

Any suggestions welcomed!

User interface changes

If a filter front end similar to the one used for Taxonomy terms is not built into Group module, it would be nice to have one!

πŸ’¬ Support request
Status

Fixed

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States SomebodySysop

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

Comments & Activities

Production build 0.69.0 2024