Describe the bug
Using the search-Field and clicking "See all results ..."
To Reproduce
Steps to reproduce the behavior:
I think the error is easy to fix:
The automatic created result link after clicking has double "news"-part: https://www.freecodecamp.org/news/news/search/?query=Flutter
if I manually remove one "news" as https://www.freecodecamp.org/news/search/?query=Flutter
the result would be the correct one.
@uwsd Thanks for the report!
It seems it's a problem with redirection.
and the link is to
cc: @raisedadead
Thank you for reporting this @uwsd. This was also a problem on /news. I deployed a quick fix and am working on PRs now.
I noticed that we could change the URLs in the search related files from https://freecodecamp.org/news/search/?query=flutter to https://www.freecodecamp.org/news/search/?query=flutter. This seems to get around the problematic redirect, at least for search results. Still an issue we need to investigate further for other use cases.
@scissorsneedfoodtoo search is still broken? I can't get anything to load for generic searches.
@raisedadead, what sort of generic searches are not loading for you? Things seem to be working on my end whether I search from .org/ or .news/.
working on my side on news and learn from multiple locations for the initial test case.
Should it say something like "No results for for 'this is a generic search', please try a different query"?
Thanks for the gif, I see what you mean now.
The behavior should be a message that says "No tutorials found" and not to allow the search to complete. There's a PR for this on News here, and I'll start working on the implementation in the main repo.
I am going close this since the above prs address the issue. Feel free to reopen if you think this issue has been closed by mistake.
Has the fix landed on production. I am able to reproduce the issue?
@raisedadead has not landed yet on learn. but you could see the fix on /news
The query string is passed on to the news application. URL is available on the GIF that I sent.
@raisedadead, we deployed the updated theme to News, so you shouldn't be able to enter a long string there and hit the search results page. Once the fix to Learn is deployed you won't be able to pass long strings with no hits to News like in the GIF.
Quick follow up, is there anything that is preventing us from deploying?
@raisedadead, sorry for the delay in deploying. We just got access to the client VM to clear out the old builds. We'll do that later today and get all these changes out.
Great, thanks for confirming. Apologies I have added the keys to the VMs a couple days ago. I missed letting you know.
I have also cleared the older builds. You should be able to simply run a build.
Thanks.
No worries man. Thank you for adding our keys. We should have checked to see if we had access yet.
We're just about to go in now and run a build.
This fix has been deployed. The problem in the gif above should no longer be possible on https://www.freecodecamp.org or https://www.freecodecamp.org/news.
Most helpful comment
Great, thanks for confirming. Apologies I have added the keys to the VMs a couple days ago. I missed letting you know.
I have also cleared the older builds. You should be able to simply run a build.
Thanks.