"Leave the replacement text blank to remove an option altogether." does not work when "rewrite text based on key" option is enabled

Created on 29 September 2025, 19 days ago

Problem/Motivation

As stated in the title, removing options only works when not rewriting based on key. This is because of the code in src/BetterExposedFiltersHelper.php where this logic is only performed when specifically not rewriting based on key. However I do not see any clear reason for this being the way it is.

Proposed resolution

Also remove options with empty rewrite values when rewriting based on key instead of generating options with empty labels.

🐛 Bug report
Status

Active

Version

7.0

Component

Code

Created by

🇧🇪Belgium chewi3

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024