fix(page-not-found): suggest search terms, add link to archived-content
Summary
Fixes https://github.com/mdn/yari/issues/6629. Fixes https://github.com/mdn/yari/issues/5853.
Problem
When users access a page that no longer exists and doesn't have a redirect in place, they are essentially stuck.
Solution
Suggest users to search the site for the URL paths beginning from the right, and mention the https://github.com/mdn/archived-content repository where removed content can be found.
Screenshots
Example: http://localhost:3000/en-US/Core_JavaScript_1.5_Guide/Exception_Handling_Statements/try...catch_Statement
Before
After
How did you test this change?
@caugner Thanks for linking me here (from https://github.com/mdn/yari/pull/3966.
It feels like we're going around in circles, discussing what should be in here, when this has already been discussed and at one point was agreed.
My take on this is that:
-
This is really good:

-
I wouldn't have this - the archive repo really isn't used anymore - most content is just hidden in the content repo

If it were easier I'd suggest that it might have been deleted so they could look in the project hitory.
Note, it might be nice though to create regular tags of the content for archiving purposes - this would make it much easier to find deleted content.
-
It is possible the topic was never created. Worth noting that - having a "request for content".
@hamishwillee
2. If it were easier I'd suggest that it might have been deleted so they could look in the project hitory.
Afaik the only way to search the project history is through git log on the command line, or am I missing anything?
2. Note, it might be nice though to create regular tags of the content for archiving purposes
Can you elaborate what you mean by that?
3. It is possible the topic was never created. Worth noting that - having a "request for content".
Are you suggesting that we add a link to open an issue for this missing page?
@caugner
- If it were easier I'd suggest that it might have been deleted so they could look in the project hitory.
Afaik the only way to search the project history is through git log on the command line, or am I missing anything?
No, thats the only way to find deleted content. That's why I was suggesting next point
- Note, it might be nice though to create regular tags of the content for archiving purposes
Can you elaborate what you mean by that?
If you branch or tag a github repo you create a snapshot that can be more easily searched/bisected, much like the wayback machine. Further, if you want to share a link to the old material that is easier. So the suggestion is that we regularly tag the main branch.
It's just an idea, which is a little easier than manually moving deleted content to an archive.
IN either case, the archive of deleted material is not maintained, so that's worse than useless and not worth linking to.
- It is possible the topic was never created. Worth noting that - having a "request for content".
Are you suggesting that we add a link to open an issue for this missing page?
No I'm suggesting that currently have have text that says (paraphrasing) "the content may have been archived" but actually it might never have been created and is empty as a "request for content". SO the suggestion was that we tell people that it might be missing because we want them to contribute.
Thank you for the input @hamishwillee.
I have now removed the archived-content hint, and updated the PR description accordingly.
Hi @caugner , Can you show a screenshot? Looking at the source it still looks like there are links to archived/retired content (and of course it is still possible that the links are intentional "just not populated yet".
Looking at the source it still looks like there are links to archived/retired content
Those remaining links are solely for retired locales whose corresponding page does not exist in English. It shouldn't hurt, but as a user of en-US you will most likely never see these.