Closed Bug 1366376 Opened 7 years ago Closed 4 years ago

Review HTTP error response pages, and add links to HTTP response code docs

Categories

(developer.mozilla.org Graveyard :: General, enhancement, P3)

All
Other
enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jswisher, Unassigned)

References

Details

(Keywords: good-first-bug, in-triage, Whiteboard: [specification][type:change][points=1])

What feature should be changed? Please provide the URL of the feature if possible.
==================================================================================
Pages displayed in cases of HTTP error response codes, such as:  https://developer.mozilla.org/en-US/404

What problems would this solve?
===============================
By making sure that the text of the pages follow best practices[1], we will help users understand and respond appropriately to errors. (I think the 404 text is pretty good, and probably the others are too.)

By linking to our own docs, we raise awareness of these docs, and provide our readers with detailed information about the problem (assuming that the site is actually accessible, which it might not be in case of some errors).

[1] https://docs.google.com/presentation/d/1gCgkaaXIFSLf3afRxEGNFwm0bPTcURcVQNuQj0QZDqQ/edit#slide=id.p6

Who would use this?
===================
Readers who encounter HTTP error responses from MDN

What would users see?
=====================
Possibly improved error descriptions, and links to detailed info about the error.

What would users do? What would happen as a result?
===================================================
User action depends on the error encountered; in some cases users might click through to the doc page. Whether they do or not, if the link is clearly labeled (e.g., "Read about 404 errors on MDN"), readers would be exposed to the idea that MDN has docs on HTTP errors.

Is there anything else we should know?
======================================
Mentor: djf
Keywords: good-first-bug
Priority: -- → P3
Whiteboard: [specification][type:change] → [specification][type:change][points=1]

I would love to work on this. Can I please be guided on how to be involved with this? I am very new on here and would love for this to be the first issue I address. Thanks.

Flags: needinfo?(dflanagan+bugzilla)

saphal1998: I no longer work at Mozilla and so I'm no longer a suitable mentor for this bug. (I'd forgotten that I was listed here.)

Our backend is a Django server and the error pages are implemented as jinja2 templates. IIRC they are located in the top-level templates directory, so they should be straightforward to find and update. What is proposed here is simply to add links to those pages. Florian is probably a good person to approve your wording changes.

Good luck, and thank you for contributing!

Flags: needinfo?(dflanagan+bugzilla)

It appears that with my non-employee account I can't remove myself as mentor.

:fscholz, Can you help guide Saphal?

Flags: needinfo?(fscholz)

I'm not a Kuma developer, but I can provide educated guesses here.

Looks like the template is https://github.com/mozilla/kuma/blob/master/jinja2/404.html

After line 33, I would add something similar to this:

<p>In the MDN <a href="https://developer.mozilla.org/docs/Web/HTTP">HTTP</a> documentation, 
you can learn more about the <a href="https://developer.mozilla.org/docs/Web/HTTP/Status/404">404 error code</a>.</p>

To translate this, you will tweak this code a bit and add {% trans %} or something. Also, I'm not quite sure how to create links correctly as the other snippets have <a href="{{ homepage_url }}">home page</a>, for example.

You can probably find this out by talking to a Kuma engineer, either by just opening a PR and start a discussion there or by going into #mdndev irc.

Thanks for your interest in contributing!

Mentor: dflanagan+bugzilla
Flags: needinfo?(fscholz)

This is how you'd do it with the translation tags:

<p>
{% trans  http_link='https://developer.mozilla.org/docs/Web/HTTP', 404_link='href="https://developer.mozilla.org/docs/Web/HTTP/Status/404' %}
In the MDN <a href="{{ http_link }}">HTTP</a> documentation, 
you can learn more about the <a href="{{ 404_link }}">404 error code</a>.
{% endtrans %}
</p>

:)

Hi, I am looking to work on this as my first bug.

Can I have some help on how to see changes we made to the HTTP error pages (such as 404)?

If the DEBUG flag is set to True Django does not show the custom 404 page. but when I set the flag to False, Kuma doesn't run in my local machine.

Hi Michael! The MDN Dev team now tracks issues in GitHub. What's left here in Bugzilla is old, low-priority issues. I've created a new github issue corresponding to this one. Check there for responses.

MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.