Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to urllib for parsing query string in changequery #8997

Conversation

raffchen
Copy link
Contributor

Closes #8994

Fixes an issue where when multiple filters from the same category are added and then a filter from a different category is added using the side menu, only one of the multiple filters from the same category remain.

Technical

This bug occurred because we used web.input to generate our query dict, but doing so keeps only the last parameter if there are multiple that share the same key value. This pull request instead gets the query string from web.ctx.env and uses urllib to parse it. This keeps all parameters in the query intact.

Testing

  1. On the book search page, apply multiple filters from the same category (subjects would be the easiest)
  2. Apply a filter from a different category (e.g. language)
  3. All filters should remain

Screenshot

If I have the following subject filters selected:
image

Adding a filter from a different category will not cause any of the previous filters to disappear:
image

Stakeholders

@cdrini
Copy link
Collaborator

cdrini commented Aug 30, 2024

It appears this problem was fixed incidentally by another PR, #9397 . Thank you for your work @raffchen ! I'm going to close this PR since the bug is no longer an issue, and since the proposed fix here has a few far reaching implications, but please feel welcome to tackle another issue!

@cdrini cdrini closed this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filters from the same category dissappear
2 participants