yari icon indicating copy to clipboard operation
yari copied to clipboard

fix(page-not-found): suggest search terms, add link to archived-content

Open caugner opened this issue 3 years ago • 1 comments

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

image

After

image

How did you test this change?

caugner avatar Sep 06 '22 09:09 caugner

@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:

  1. This is really good: image

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

    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.

  3. It is possible the topic was never created. Worth noting that - having a "request for content".

hamishwillee avatar Sep 15 '22 23:09 hamishwillee

@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 avatar Oct 20 '22 18:10 caugner

@caugner

  1. 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

  1. 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.

  1. 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.

hamishwillee avatar Oct 20 '22 23:10 hamishwillee

Thank you for the input @hamishwillee.

I have now removed the archived-content hint, and updated the PR description accordingly.

caugner avatar Oct 24 '22 18:10 caugner

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".

hamishwillee avatar Oct 24 '22 22:10 hamishwillee

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.

caugner avatar Oct 25 '22 19:10 caugner