Skip to content

Adds more basic info to the default 404 page #9656

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

Merged
merged 4 commits into from
Oct 13, 2022

Conversation

benjaoming
Copy link
Contributor

@benjaoming benjaoming commented Oct 11, 2022

Addresses #2551 with a very simple improvement. The 404 page context is still unaware of what project it belongs to, that should follow in a different update.

TODO:

  • Verify that this is covered by a test

image


📚 Documentation previews 📚

@benjaoming benjaoming added the Design Design or UX/UI related label Oct 11, 2022
@benjaoming benjaoming requested a review from a team as a code owner October 11, 2022 13:58
@benjaoming benjaoming requested a review from agjohnson October 11, 2022 13:58
@humitos
Copy link
Member

humitos commented Oct 11, 2022

I think the message should clearly communicate this page belong to a documentation project that it's hosted by Read the Docs but it's not a 404 page on Read the Docs itself. To me, the "Back to the main page" is confusing in that regard. I would expect that I'd arrive at the main page of the documentation that I'm looking for. Why not include the information about the project on this PR as well? I think that will work to remove the ambiguity in the message.

@benjaoming
Copy link
Contributor Author

I'm writing a separate PR about adding context to the 404 page.

See the PR description:

The 404 page context is still unaware of what project it belongs to, that should follow in a different update.

@ericholscher
Copy link
Member

ericholscher commented Oct 11, 2022

I do agree with Manuel that the Back to main page could use some work, and could be confusing. Perhaps Go back to the front page of this site or something, but any copy we write is going to be weird, because we don't know 100% where the link will go.

@benjaoming
Copy link
Contributor Author

benjaoming commented Oct 12, 2022

Text updated + screenshot in description updated. I added request.get_host to the template.

@benjaoming benjaoming mentioned this pull request Oct 12, 2022
8 tasks
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good, simple addition.

@@ -16,6 +16,10 @@
{% block language-select-form %}{% endblock %}

{% block content %}
<p>{% blocktrans context "404 page" %}This is a 404 error page. The link you have followed or the URL that you entered did not work. It might be that the documentation has been updated.{% endblocktrans %}</p>

<a href="/">{% blocktrans with site_name=request.get_host|default:_("this site") context "404 page" %}Back to the front page of {{ site_name }}{% endblocktrans %}</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a nice addition 👍

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see too much value on this PR, but I'm fine merging it if you consider. I think that #9657 is the way to go and will replace this PR.

Another extra step related to "improve 404 page" work, IMO, would be to have _ completely different_ 404 pages for "application 404 page" and "documentation 404 page". That way, it will be a lot more clear if that 404 page the user reached is related to Read the Docs itself or if it's part of the project they wanted to read documentation about.

@benjaoming benjaoming merged commit a086a12 into readthedocs:main Oct 13, 2022
@benjaoming benjaoming deleted the 404-back-to-index branch October 13, 2022 10:15
@benjaoming
Copy link
Contributor Author

@humitos I do see some value here: Instead of having an almost arrogant 404 page that doesn't tell the user anything, we now have a friendlier version that on a more fundamental level says what might have gone wrong.

I agree that it can be improved through more context, this PR was meant as the fastest way to improve the current situation + a bit of exercise before a larger changeset. Contextualizing the current 404 page or making 2 versions definitely makes sense, but I'm sure it's also more complex and requires a bit more ideas to be tossed around :)

@benjaoming
Copy link
Contributor Author

I like the ascii art, but the word "yet" at the very end is misleading, perhaps we should remove that in future updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Design or UX/UI related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants