Option "Ensure that only one result can be displayed" unexpected behavior

Created on 4 July 2025, 3 days ago

Problem/Motivation

The option "Ensure that only one result can be displayed" can still result in having 2 results combined with other filters.

Steps to reproduce

  1. Create a view with an exposed fulltext field
  2. Have a facet shown as a dropdown and the option "Ensure that only one result can be displayed" checked
  3. When visiting the view, choose 1 value from the facet
  4. Give in a search term in the fulltext field that will produce 0 results but still has other values in the facet enabled
  5. Choose another facet value from the dropdown
  6. Remove the search term
  7. Both the first and the last selected facet value are in the active items

Proposed resolution

Adjust the ShowOnlyOneResult logic in the FacetsUrlProcessor by removing all active items related to the facet. This is done to make sure that when a value is selected, only that value is active for that facet.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium cgoffin

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024