Views multiple exposed form, Ajax enabled, multiple ajax hits on submit

Created on 6 May 2017, about 7 years ago
Updated 10 June 2024, 21 days ago

Problem/Motivation

Hi Team,

I am not sure if this bug is because of Views or because of Block module, but here is the issue I am facing.

What behavior were you expecting?
- There should be one AJAX hit, and the throbber should go.

What happened instead?
- There were multiple AJAX hits, as many number of exposed forms, that many ajax hits. 2 forms, 2 ajax hits.
- The throbber doesn't go, as it adds multiple throbbers, but remove only one.

I have tried this on a vanilla install, also this is happening on one of my projects I am working on.

Happy to provide any further information and help.

Thanks.

Steps to reproduce

- Create a new view, say a content view and a page display.
- Add filters and expose them (I also exposed sort).
- Enable "Exposed form in block" to Yes
- Enable AJAX.
- Go to blocks page, and then place the block in 2 regions, or any multiple regions.
- Go to the new view and try applying filters.
- Make sure to open the debug tools, to capture the AJAX hits.

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Views 

Last updated less than a minute ago

Created by

🇮🇳India vaibhavjain Delhi

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • JavaScript

    Affects the content, performance, or handling of Javascript.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • 🇺🇸United States smustgrave

    This could use an issue summary. Started it but someone familiar with the issue should fill in

  • 🇺🇸United States Danny Englander San Diego

    I tested the patch in #65 and it applies and works fine with Drupal 10.2.5. My use case is that I want different parts of the same exposed Ajax form in 2 areas of the page. This works as expected, no log errors, no console errors, or Ajax errors.

    Something that baffles me is the form ids are duplicated for each implementation of the exposed form. There are a number of issues open for that, a few in the "Related" and "Referenced by" section on this page. I always understood that duplicate form ids was not good for accessibility and could cause unexpected issues so just wanted to flag that with this patch.

Production build 0.69.0 2024