- Issue created by @prudloff
- Status changed to Needs review
11 months ago 4:40pm 20 December 2023
I am getting a problem similar to
🐛
Ajax state leaking to Views destination paths
Fixed
.
Since we upgrade to Drupal 10.1, our facet reset link contains a lot AJAX GET parameters:
/catalogue?search_api_fulltext=Test&ajax_page_state%5Btheme%5D=front&ajax_page_state%5Btheme_token%5D=&ajax_page_state%5Blibraries%5D=admin_toolbar/toolbar.tree%2Cadmin_toolbar/toolbar.tree.hoverintent%2Cadmin_toolbar_search/search%2Cadmin_toolbar_tools/toolbar.icon%2Cadvagg_mod/css_defer%2Cbig_pipe/big_pipe%2Cclassy/base%2Cclassy/messages%2Ccontextual/drupal.contextual-links%2Ccontextual/drupal.contextual-toolbar%2Ccore/drupal.active-link%2Ccore/normalize%2Cdevel/devel-toolbar%2Cenvironment_indicator/drupal.environment_indicator%2Cextlink/drupal.extlink%2Cfacets/drupal.facets.checkbox-widget%2Cfacets/drupal.facets.dropdown-widget%2Cfacets/drupal.facets.general%2Cfacets/drupal.facets.hierarchical%2Cfacets/drupal.facets.views-ajax%2Cfolio_blocks/newsletter-popin%2Cfontawesome/fontawesome.svg.regular%2Cfontawesome/fontawesome.svg.solid%2Cfront/block--search-form%2Cfront/breadcrumb%2Cfront/critical-css%2Cfront/filtres-recherche%2Cfront/font-families%2Cfront/global-js%2Cfront/overlay--filters%2Cfront/overlay--menu%2Cfront/overlay--newsletter%2Cfront/rest-css%2Cfront/smart-header%2Cgenpass/genpass%2Cgin/gin_accent%2Cgin/gin_base%2Cgin/gin_init%2Cgin/gin_toolbar%2Cinsite_admin_links/insite_admin_links.menu_icons%2Cmatomo/matomo%2Cparagraphs/drupal.paragraphs.unpublished%2Csettings_tray/drupal.settings_tray%2Csystem/base%2Ctacjs/tacjs%2Ctacjs/tarteaucitron.fr.js%2Ctacjs_log/tacjs_log%2Ctoolbar/toolbar%2Ctoolbar/toolbar.escapeAdmin%2Cuser/drupal.user.icons%2Cviews/views.ajax%2Cviews/views.module
Add facets and a facet summary block with a reset link on a view with AJAX.
Select a facet.
The reset link appear but has ajax_page_state query parameters.
The easiest way to avoid this would probably be to unset ajax_page_state
before passing the parameters to the link (similar to this fix: https://git.drupalcode.org/project/drupal/-/commit/7b0afe899f3ca30ecf6fc...).
Needs review
2.0
Code