Search API exposed filters not working for Views in Paragraphs

Created on 21 April 2020, over 4 years ago
Updated 6 October 2023, about 1 year ago

Scenario:
We created a Paragraph to embed a View into a page (with Ajax disabled). We use a module (such as Views Exposed Filter Blocks) to expose the filters as a block and have that block appear on the same page.

Expected result:
Users can type in keywords (as an example exposed filter) and have the View be properly filtered by those exposed inputs on submit.

Actual result:
When we submit the keyword search, our Search API View does not properly recognize the query parameters to filter the View and no filtering happens on submit. This appears to work correctly with Ajax enabled, but fails if Ajax is disabled. Note this also failed for us with a standard View (aka not specific to Search API).

Solution:
I'm am aware my solution is not the best approach, but without more knowledge about D8 Views and how this module interacts, this was the best I could come up with.

Essentially we provide the exposed input before the View is executed so that it will properly filter when Ajax is disabled. Hopefully someone with more knowledge can provide a better solution.

I am also aware that it may be an interaction from another module causing issues, but it has been difficult to narrow down and unfortunately this project is not affording me a lot of time for investigation.

Problem exists on both 1.4 and 2.x, so I am providing patches for both (same resolution).

🐛 Bug report
Status

Needs review

Component

Code

Created by

🇨🇦Canada PaulDinelle

Live updates comments and jobs are added and updated live.
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.

Production build 0.71.5 2024