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

Make use of 404 template? #602

Closed
k0nsl opened this issue Jul 20, 2016 · 3 comments
Closed

Make use of 404 template? #602

k0nsl opened this issue Jul 20, 2016 · 3 comments
Labels
question template HTML rendering

Comments

@k0nsl
Copy link

k0nsl commented Jul 20, 2016

I'm wondering if anyone is working on actually making use of the 404.html template in the tpl directory. This could and probably should be used for when searches and tags return no results.

The same principle could be used to generate 403s upon failed login attempts; just create a 403.html template and modify the content accordingly.

I tried searching the code and found no references that makes use of the 404.html template

@virtualtam
Copy link
Member

Hi @k0nsl ,

The 404 template was introduced by #430 / #444, it is rendered in the following situations:

  • link not found
  • tag not found
  • day not found (Daily digest page)

This could and probably should be used for when searches and tags return no results.

A 404 should only be returned/displayed/rendered when the user/client attempts to access a resource that does not exist.

The situation of a user running a search query that returns no result -either because there are no entries corresponding to the aforementioned query, or said user does not have access to some (private) results- is a nominal case, and will not lead to returning a 404 error page.

Now regarding the addition of a 403 template:

@virtualtam virtualtam added question template HTML rendering labels Jul 20, 2016
@ArthurHoaro
Copy link
Member

404 is only rendered when a small hash isn't found, despite propositions in #430. Maybe, it can be re-discussed.

About the login, displaying an error page is not ergonomic. When you mistype your password, you expect to be able to retype it again in the same page (using blank keycaps, you learn that the hard way).

@nodiscc
Copy link
Member

nodiscc commented Jul 20, 2016

a 404 page on day not found (Daily page) make sense (though the only way to access a non-existing day, is to try to access a manually entered URL - only existing days are linked from the calendar)

For the tag not found situation (http://shaarlidemo.tuxfamily.org/Shaarli/?searchtags=doesnotexist) I think the current behavior is fine - Blank list, Nothing found message, and it allows you to try another search directly.

@k0nsl k0nsl closed this as completed Jul 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question template HTML rendering
Projects
None yet
Development

No branches or pull requests

4 participants