Facets exclude search query when using "Use clean URL's" option

Created on 28 April 2021, about 3 years ago
Updated 24 November 2023, 7 months ago

Problem/Motivation

Search API Page includes an option "Use clean URL's". With a base path of "/search", the search results page for the keyword "something" will change from "/search?keys=something" to "/search/something". When this happens the facets on the page will use the path "/search" instead of "/search/something".

Steps to reproduce

Configure a search index in Search_API.
Configure a Search_API_Page page to show results for that index.
Configure a facet for this index on this page.
Configure the block visibility rules to display the facet on the search page.
Use the search to look for data; confirm that data is present on the results page.
Click one of the facet links.

What should happen:
* The results should still be filtered with the keyword(s) entered.

What happens:
* The results are filtered by the facet but the keyword(s) are no longer being filtered.

Proposed resolution

The facets should be added to the current URL rather than just using the root search page path.

Remaining tasks

Work out the source of the bug.
Fix the bug.
Write test coverage.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

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.69.0 2024