Option options_show_only_used_filtered returns error if intersection is empty

Created on 25 October 2023, about 1 year ago

Problem/Motivation

If you expose two filters, one of which has the options_show_only_used_filtered option, when you select two filters whose intersection returns an empty result, the following error message appears:

Error message
The submitted value X in the field_name element is not allowed.

Steps to reproduce

  1. Create a content type with two taxonomy reference fields.
  2. Create some test nodes.
  3. Create a view with two exposed filters, one for each taxonomy reference field.
  4. Set "Show only used items" and "Filter items based on filtered result set by other applied filters" on the first exposed filter.
  5. Open the view and select a filter combination that produces no results.

At this point the view displays all nodes regardless of the filters and it trigger the error.

Proposed resolution

Don't show the error message and display the "empty view" result.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇮🇹Italy finex

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

Comments & Activities

Production build 0.71.5 2024