Already selected filters should not be removed from the allowed values

Created on 22 May 2023, over 1 year ago
Updated 11 October 2023, about 1 year ago

Problem/Motivation

Users can visit view pages with preselected filters. If one of the filters has no results (e.g. no results tagged with a specific term), the "An illegal choice has been detected. Please contact the site administrator." message will appear. This is a bad user experience.

Steps to reproduce

1. Create a view page (e.g. /news)
2. Add a filter on a taxonomy term field
3. Enable Better Exposed Filters, check the "Show only used items" option on the field
4. Create a news category that is not used
5. Visit the view page filtered by that news category (e.g. /news?category[1]=1)
6. See the "An illegal choice has been detected. Please contact the site administrator." message

Proposed resolution

Allowed values should include already selected values

✨ Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡·πŸ‡΄Romania stefan.butura

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

Comments & Activities

Production build 0.71.5 2024