Skip to content

Documentation links missing on versions >=16.9 #3138

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

Closed
a2intl opened this issue Jul 26, 2020 · 12 comments · Fixed by #3516
Closed

Documentation links missing on versions >=16.9 #3138

a2intl opened this issue Jul 26, 2020 · 12 comments · Fixed by #3516

Comments

@a2intl
Copy link

a2intl commented Jul 26, 2020

On the page https://reactjs.org/versions/ , all of the versions from 16.9 and above (newer) are missing the "Documentation" link.

image

@kwaimind
Copy link

@a2intl are you sure? I'm seeing all the way up to 16.13.1

image

@belovsandr
Copy link

@kwaimind what @a2intl is trying to say is that versions 15.6-16.8 have both changelog and documentation links, but versions 16.9-16.13.1 have only changelog link (as seen in both your screenshots)

@kwaimind
Copy link

kwaimind commented Aug 1, 2020

Yeah that's my bad 🙋‍♂️ I totally misread the message.

@saswatamcode
Copy link
Contributor

Also all the documentation links seem to result in Page Not Found errors. Maybe removing them and just keeping the changelogs would be a good idea @rickhanlonii ?

@gaearon
Copy link
Member

gaearon commented Aug 9, 2020

Something broke with the redirects. :-(

@gaearon
Copy link
Member

gaearon commented Aug 9, 2020

(But that's a separate problem from us forgetting to update the page.)

@saswatamcode
Copy link
Contributor

Oh. That's why I couldn't find the /version/versionNumber page anywhere.

@jo-flynn
Copy link

How can this be open for months with multiple issues and no action? Not everyone is using the latest and greatest and people often need to reference old docs.

@gaearon
Copy link
Member

gaearon commented Feb 10, 2021

Redirects were originally added in #801.

You can see there's a script that appends stuff to _redirects. My guess is that somehow this script either doesn't run anymore since some Gatsby update, or it doesn't write things in the correct format, or it isn't written at the right time.

If someone wants to look into the cause, it would be highly appreciated.

How can this be open for months with multiple issues and no action? Not everyone is using the latest and greatest and people often need to reference old docs.

I totally understand your frustration! It slipped through the cracks. We're a small team and there are hundreds of issues across many repos. This one kept coming up so I expected that somebody motivated would send a PR with a fix, but maybe there weren't enough details. I hope there's enough now.

@gaearon gaearon mentioned this issue Feb 10, 2021
@gaearon
Copy link
Member

gaearon commented Feb 10, 2021

Here's my guess #3516

@gaearon
Copy link
Member

gaearon commented Feb 10, 2021

This is fixed now.

And here's my workflow for finding the issue, in case someone wants to contribute to similar issues but doesn't know how:

  • I looked for where the versions are pulled from. That's versions.yml.
  • I searched PRs for "versions" and found the PR that introduced this functionality. (Another way to do this would be to look at Git history for versions.yml and find when it was checked in.)
  • I read the PR (Added redirects for old React versions #801). It appends some generated stuff to public/_redirects on Gatsby build.
  • I put a log in that function and did yarn build locally. The function ran, but the file was not modified.
  • I verified that we do get to the end of the script, so it's something with appendFile not working. But I also noticed that there is some other script appending to the same file. That gave me the idea about the race condition.
  • I looked at the call to the script and noticed a missing await.

The fix ended up being one line.

We totally dropped the ball here and I agree we should have looked much earlier. At some point I assumed the problem was with the hosting, and I even remember bringing this up with Netlify support, but I think I forgot to follow up about this.

Still, this is an open source project, and I hope that the above writeup can show how someone motivated to fix this could do it. I didn't have any knowledge about how this version integration was set up, and it didn't take that long to fix.

Nice contribution opportunity. :-)

@davemjones
Copy link

Old versions of the documentation is still unavailable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants