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

Submitting an empty search returns results for 'undefined' #459

Open
kevinschaper opened this issue Aug 31, 2021 · 0 comments
Open

Submitting an empty search returns results for 'undefined' #459

kevinschaper opened this issue Aug 31, 2021 · 0 comments

Comments

@kevinschaper
Copy link
Member

Looking through Google Analytics, I noticed that our most popular search results page for 2020 was an empty search...which gives the embarrassing response of searching for the term 'undefined'

Some sites return an error message for an empty search, but I find that it's a nice opportunity to start browsing if I'm just getting a look around.

I wasn't sure if this was a UI or API issue, but it looks like might be a bit of both. The url requested by the UI begins with https://api.monarchinitiative.org/api/search/entity/undefined - so 'undefined' is coming from the UI code. Poking at it manually, the API url format doesn't seem to allow for an empty query string.

It would be nice to move both the UI urls and the API to using query or q as the query parameter. (This also has the side benefit of letting us configure site search Google Analytics)

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

No branches or pull requests

1 participant