Content: Links to Rhino examples are dead

Created on 8 Feb 2021  Â·  17Comments  Â·  Source: mdn/content

Rhino documentation no longer links to examples (links are dead). Here is the Rhino documentation:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Documentation
And here are the missing examples:
https://developer.mozilla.org/en-US/docs/Rhino/Examples

Other

All 17 comments

I can remove the links

@CreaTorAlexander No, you should fix the links, not remove them.

For example:
https://developer.mozilla.org/en-US/docs/Rhino/Examples
is a link that doesn't work, but this link does:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Examples
same goes for many other links.

Okay, so that would require a change on https://github.com/mdn/content/blob/df5700486afefcf0f130b5fd78aff475d51c274a/files/en-us/_redirects.txt if I understand that correctly.

I think, the command for it is yarn content add-redirect <old_url> <new_url>.
You'll need a local setup for this: https://github.com/mdn/content#more-substantial-changes

@Betalord on which page have you found the dead link? I greped for it inside the project but I haven't found it.
Bildschirmfoto 2021-02-09 um 18 38 53

There's a chance, that the link exists on some external documentation page which weren't updated …

@Ryuno-Ki

Okay, so that would require a change on https://github.com/mdn/content/blob/df5700486afefcf0f130b5fd78aff475d51c274a/files/en-us/_redirects.txt if I understand that correctly.

I think, the command for it is yarn content add-redirect <old_url> <new_url>.
You'll need a local setup for this: https://github.com/mdn/content#more-substantial-changes

I did this now I am not sure if it worked as expexted. When I run git diff it shows me this
Bildschirmfoto 2021-02-09 um 18 55 35

I run this command
yarn content add-redirect /en-US/docs/Rhino/Examples /en-US/docs/Mozilla/Projects/Rhino/Examples

Well links on the front page don't work, for example:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Documentation
Pretty much any link you click is a dead link, try it! Not sure if this is
due to some recent changes?
Anyway, even within specific documentation pages, where there is a link to
various examples - those links don't work either.

On Tue, Feb 9, 2021 at 6:56 PM Alexander Heß notifications@github.com
wrote:

@Ryuno-Ki https://github.com/Ryuno-Ki inside the _redirects.txt is no
entr

Okay, so that would require a change on
https://github.com/mdn/content/blob/df5700486afefcf0f130b5fd78aff475d51c274a/files/en-us/_redirects.txt
if I understand that correctly.

I think, the command for it is yarn content add-redirect
.
You'll need a local setup for this:
https://github.com/mdn/content#more-substantial-changes

I did this now I am not sure if it worked as expexted. When I run git diff
it shows me this
[image: Bildschirmfoto 2021-02-09 um 18 55 35]
https://user-images.githubusercontent.com/44900696/107406156-6a2a4e80-6b08-11eb-9999-4a65de9f427b.png

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mdn/content/issues/2181#issuecomment-776124642, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNUCKYH4VQLXQKM2ZG5Y53S6FZL3ANCNFSM4XJWAKTQ
.

@peterbe As you have most likely the deepest knowledge in this: Does the above diff look legit to you?

The links were wrong within the HTML and have been for ages. When we migrated from the Wiki to the new system (Yari) we migrated the archived content into a separate repo, but we didn't include its redirects.
So there...

  • active content

    • redirects

  • translated content

    • redirects

  • archived content

    • NO redirects

:(

The quickest and simplest solution is unfortunately to make a PR on the rendered HTML in the archived-content repo. E.g. https://github.com/mdn/archived-content/blob/main/files/en-us/mozilla/projects/rhino/documentation/index.html
Basically do:

- <dt><a href="/en-US/docs/Rhino/Examples">Examples</a></dt>
+ <dt><a href="/en-US/docs/Mozilla/Projects/Rhino/Examples">Examples</a></dt>

@peterbe that's it only fix this one link? I mean all the links on https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Documentation are broken

@peterbe that's it only fix this one link? I mean all the links on https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Documentation are broken

No. Sorry. I implied that you'd make multiple edits like the above-demonstrated diff all across that page.

I chatted to @chrisdavidmills about this today.

The fact that we didn't port the archived-content's redirects was most likely a mistake. This issue isn't the first and won't be the last that would be a non-issue if we had ported the redirects.
So I'm going to try to dig up the old migration code and see if I can produce a _redirects.txt file specifically for URLs that are considered archived. I can only hope that it's easy. But it might be complicated.
For one, the "patterns" we used for deciding if something is archive or not, is based on the "destination". I.e. /Mozilla/Projects/Rhino/* is a pattern. But /Rhino* is not. Let's see what shakes out. No promises, but I'll try.

Would it help when I do it for this site manually? I mean these are 15-20 links this will be fixed fast.

:crossed_fingers:

Would it help when I do it for this site manually? I mean these are 15-20 links this will be fixed fast.

Truth is, we don't really accept pull requests on the archived content. There's nobody to review them. But we've made exceptions in the past.

I'm already on the way to fix this wholesome by re-migrating all the archived content redirects. It'll take a couple of days from coding to deployment until it's all there.
But progress is good. I logged all the URLs that it would pick up and all the /Rhino redirects were there.

If you look at https://github.com/mdn/archived-content/pull/6 you'll see that the en-us/_redirects.txt file has things like this:
Screen Shot 2021-02-10 at 1 01 03 PM

Which makes me confident that the links in pages like https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Documentation will start to work again.

See https://github.com/mdn/yari/pull/2880#issuecomment-777808063
This is going to help all old legacy archive URLs that became broken in the Yari migration.

Was this page helpful?
0 / 5 - 0 ratings