nim-lang / nimforum

Lightweight alternative to Discourse written in Nim
https://forum.nim-lang.org/
MIT License
762 stars 70 forks source link

Search can return invalid links #167

Open markprocess opened 6 years ago

markprocess commented 6 years ago

https://forum.nim-lang.org/search?q=graphql

produces some links that are invalid, for instance clicking on the response from dom96 produces

Couldn't retrieve posts.

Please report this issue to us so we can fix it!

I can think of a few approaches to address this:

where isValid does the obvious check.

What do you think?

ghost commented 6 years ago

@markprocess that's because this GraphQL thread was deleted (probably it was marked as "deleted" but it wasn't removed from the DB)

dom96 commented 6 years ago

Can't reproduce? I get a 404 which is expected behaviour.

ghost commented 6 years ago

@dom96 if you search for graphql you can see NimQL - Help and Guidance Appreciated thread in the search results, but it's removed, so this issue is about deleted threads being visible in the search results.

dom96 commented 6 years ago

Yes, I know. I was looking for that error message. Clicking on my post gives it.

markprocess commented 6 years ago

FYI if the page that prompts the user to report an issue is refreshed then a 404 is generated, which is not the right thing to do. The 404 also has a page title "$title" in the browser tab.

markprocess commented 6 years ago

@Yardanico @dom96

https://forum.nim-lang.org/gibberish

prompts for an issue report but it is a syntax error. Cheers, Mark.