Views allow multiple values

Created on 26 March 2025, 10 days ago

Problem/Motivation

When you have multiple languages, and use the view attachement to put something before your view, and you want to keep the filters actives, you have two options, Inherit exposed filters but this is not working unfortunately, when I'm using the module Facets, so the other options, is to create contextual fitlers, and define default value using the urls paramters, as my facets allow multiple value, we have to tick the "allow multiple value", but this feature is not working as expected, because we don't have always multiple value in the url, if the user only filter using one, we have only one options in the url, and then the results is empty, if the user tick two options, then this is working.

Also something aside, is that the value in the url is passing the taxnomy term, so when the customer change language, nothing is working because the taxomy term are translated, so the best will be to pass the taxomony id for example, like that even if we change language it will work.

Steps to reproduce

- setup a drupal with multiple language
- create an views, with exposed filter multi value of taxonmy term
- create an attachement with allow multiple value, and setup the default value using the same url parameters
- the attachement will not work
- change language, all the fitlers will be lose

Proposed resolution

add a check to allow multiple value to work wiht only one value and use the taxonomy term id instead of the term name, to allow the language switch

Thanks

🐛 Bug report
Status

Active

Version

11.1 🔥

Component

views.module

Created by

🇨🇭Switzerland sir_squall

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

Comments & Activities

  • Issue created by @sir_squall
  • 🇳🇿New Zealand quietone

    Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies . Restoring template. The issue template is used to track progress and various tasks on an issue.

    There are many issues in the views and views_ui component. Did you search for a duplicate issue before creating this one?

Production build 0.71.5 2024