ajax_page_state injected in query when using AJAX

Created on 10 May 2024, 8 months ago

Problem/Motivation

We are trying to use this module on an AJAX view and if facets are updated with a GET AJAX request (see this change record ), the autocomplete URL will contain the very long ajax_page_state query parameter.
(See 🐛 Ajax state leaking to Views destination paths Fixed for a similar core issue.).

Steps to reproduce

  1. Use Drupal 10.1+.
  2. Create a search_api view with AJAX enabled.
  3. Create facets_autocomplete facet for this view + another facet.
  4. Click on the other facet to reload the view with AJAX.
  5. Select something in the autocomplete facet: the page is reloaded and ajax_page_state is in the URL.

Proposed resolution

AutoCompleteWidget::build() could remove the ajax_page_state parameter from the generated URLs.

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇫🇷France prudloff Lille

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