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

fix: wrong advanced filter formatting handling #1495

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

DonKoko
Copy link
Contributor

@DonKoko DonKoko commented Dec 9, 2024

The symptoms and problem

We have found a bug with the advanced index This shouldn't happen but it happened to some of our users, so we need a way to handle it to prevent an error if it happens again.

So lets say you navigate to this url: http://localhost:3000/assets?status=AVAILABLE
But you have advanced index mode active.

The params structure in the advanced index is different, however status is a proper param name. So it was crashing because it was trying to parse AVAILABLE as a advanced index filtering param but it doesnt have the correct format.

THe format in the url above is the one we use on simple index. I am not sure how this leaked to the url params in the case of our user. My only thought is that they already had advanced mode active and they typed in their url bar and this was the automatic URL suggested.

The Fix

Implemented some functions that validate the format of the params values for params which are within the column filter names. If there are some broken ones, we remove them and reload the page with the cookie updated.

@DonKoko DonKoko merged commit 9214caa into main Dec 10, 2024
4 checks passed
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.

1 participant