Problem/Motivation

The query string filtering logic introduced in #343535: Enable bookmarking of AJAX views in `core/modules/views/js/ajax_view.js` has two bugs that cause AJAX exposed filters with `
` elements or special characters in names to break on subsequent filter interactions.

Bug 1: Only `` elements are matched

At line 94 of `ajax_view.js`, the code uses `input[name="${name}"]` CSS selector to identify exposed filter parameters that should be removed from the query string:

js
this.$exposed_form.find(`input[name="${name}"]`).length === 0

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3588626

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

leo liao created an issue. See original summary.

leo liao’s picture

Issue summary: View changes
leo liao’s picture

ishani patel made their first commit to this issue’s fork.

leo liao’s picture

StatusFileSize
new1.65 KB

A new feature, `setBrowserUrl`, was introduced following the recent update. We are providing an optional patch to remove this feature, as our clients do not require it, and it detracts from the site's aesthetic elegance.

leo liao’s picture

StatusFileSize
new1.65 KB

I'm sorry, file #5 failed to apply in 11.3.

quietone’s picture

Version: 11.3.x-dev » main
Issue summary: View changes

Hi, Issues for Drupal core should be targeted to the 'main' branch, our primary development branch. Changes are made on the main branch first, and are then back ported as needed according to the Core change policies. The version the problem was discovered on should be stated in the issue summary Problem/Motivation section. Thanks.

Restoring standard issue template so we can track progress on this issue.