Non-Exposed combined with Exposed Filters on same Text List Field Not Working

Created on 17 August 2015, over 9 years ago
Updated 17 January 2024, 10 months ago

I have a view that I am using to generate two displays that are shown on a page with quicktabs. The views have a primary (non-exposed) filter for a completion state, which is a Text List field on the Node:

  • Planned
  • In Progress
  • Delayed
  • Complete
  • Canceled

The View Display is a FooTable (this is unrelated). On one View Display, I set the primary (non-exposed) filter to ONE OF and limit the select list options to 'Planned', 'In Progress' and 'Delayed'. I then add an exposed filter to allow users to further refine the list to one of these three options, so there are two filters for the same field.

I have found that in order for the above to work properly, the non-exposed filter (primary) must be ordered ABOVE the exposed filter.

But things get funny with my second View Display, in which I have a primary (non-exposed) filter to ONE OF 'Complete', 'Canceled' combined with a secondary exposed filter for these two list items. When selecting 'Complete' in the exposed filter, the SQL output shows the following in the query:

LEFT JOIN {field_data_field_permit_status} field_data_field_permit_status2 ON node.nid = field_data_field_permit_status2.entity_id AND field_data_field_permit_status2.field_permit_status_value != 'Complete'

Note that the query is now looking for anything that does NOT have the term 'Complete', which is the opposite of what we want. This is a bug.

A workaround is to change the non-exposed primary filter to select the initial terms through an inverse (IS NOT ONE OF 'Planned', 'In Progress', 'Delayed'). This will then work with a secondary filter of IS ONE OF, however it appears that two filters on a select list IS ONE OF does not work.

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
Views 

Last updated about 3 hours ago

Created by

🇺🇸United States brooke_heaton

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.

  • 🇮🇪Ireland frankdesign

    In case someone arrives on this issue page and they are using Grouped Filters, the "Reduce duplicates" options is not available in the UI on Grouped Filters. So as a workaround, you need to revert to a Single Filter, put a tick in "Reduce duplicates" and then recreate the Grouped Filter.

Production build 0.71.5 2024