Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Edit on GitHub-link gets an 404 #512

Closed
florianb opened this issue Mar 30, 2020 · 11 comments · Fixed by #527
Closed

Edit on GitHub-link gets an 404 #512

florianb opened this issue Mar 30, 2020 · 11 comments · Fixed by #527

Comments

@florianb
Copy link

Clicking on "Edit on GitHub" f.e. at this page: https://docs.couchdb.org/en/stable/index.html
returns an 404-error.

Expected Behavior

I hoped i'd be redirected to the according GitHub-page.

Current Behavior

404

Possible Solution

I guess there's just a linkpath or something like that broken - give me a hint and i'll try to provide a PR.

Steps to Reproduce (for bugs)

  1. go to https://docs.couchdb.org/en/stable/index.html
  2. click "Edit on GitHub" in the upper right corner.

Context

Tried to fix the documentation.

Your Environment

FF 75.0b9 (64-bit) on Ubuntu 19

@wohali
Copy link
Member

wohali commented Mar 30, 2020

Hey @florianb ,

This is a readthedocs.org bug. The problem seems to be the commit they've chosen for the stable version. All the other versions bring up the correct "Edit on GitHub" link.

I'll take ths one.

@wohali wohali self-assigned this Mar 30, 2020
@florianb
Copy link
Author

Thank you very much @wohali - give me a hint if i can help out!

@wohali
Copy link
Member

wohali commented Mar 30, 2020

Looks like readthedocs/readthedocs.org#1820 is the core issue here.

It should have been fixed per that issue report, but we're still seeing the bad behaviour: stable is a tag that points to this commit: f009601a which GH refuses to display (because that's the tag hash, not the commit hash.)

We had to move to stable being a tag for our release process. We can't go back to letting RTD determine what the latest semver tag is because we tag the documentation before we release now, meaning RTD "stable" may point to an unreleased version of documentation that can confuse users. (This happened for a few weeks during the 3.0.0 release cycle.)

If you're able to sleuth this further, let me know.

@florianb
Copy link
Author

Thanks a lot @wohali - it might be possible to manually set the target version of stable using Automation Rules/Actions.

It would be possible to map stable to f.e. latest or the given version number. To be able to do that i'd say that must be tightly integrated into the build process (using f.e. envsubst) to avoid future bugs.

If you'd like to see something like that, give me a hint - i'd probably give it a try.

@wohali
Copy link
Member

wohali commented Mar 31, 2020

Hi @florianb ,

Sadly, that won't work, for two reasons.

The first is stable is already pointing at the same checkout as 3.0.0. In fact this is how I did it manually:

git checkout 3.0.0
git tag <options> stable
git push origin --tags

The problem is that reference RTD is picking up is the tag hash, not the referred to git hash.

The second problem with your approach - which wouldn't change anything anyway - is because Apache explicitly disallows any automated action that changes the code repository. This is due to legal reasons necessary to protect the Foundation. I can dig up the LEGAL ticket on this if you need more clarification.

What's necessary here is to figure out why the fix in readthedocs/readthedocs.org#1820 isn't working for us.

@manjufy
Copy link

manjufy commented Apr 26, 2020

wohali added a commit that referenced this issue Apr 27, 2020
@wohali
Copy link
Member

wohali commented Apr 27, 2020

Because this is hard to work out, I'm going to disable the per-page "Edit on Github" links for now. There will still be a nav to the GH repo available from the pop-up menu on the bottom left.

@wohali wohali mentioned this issue Apr 27, 2020
wohali added a commit that referenced this issue Apr 27, 2020
* bump version to 3.0.1

* Disable 'Edit on Github' links, fixes #512
@wohali wohali removed their assignment Apr 27, 2020
@wohali
Copy link
Member

wohali commented Apr 27, 2020

Well, shoot. That didn't work.

@wohali wohali reopened this Apr 27, 2020
@francwalter
Copy link

Because this is hard to work out, I'm going to disable the per-page "Edit on Github" links for now. There will still be a nav to the GH repo available from the pop-up menu on the bottom left.

Edit on Github Link is still active and not working on Apache CouchDB® 3.0.0 Documentation

Thanks, frank

@wohali
Copy link
Member

wohali commented May 3, 2020

Yup, that's why the issue was reopened.

@wohali wohali closed this as completed May 3, 2020
@wohali wohali reopened this May 3, 2020
@wohali
Copy link
Member

wohali commented May 5, 2020

Fixed with a forced move of the stable tag.

@wohali wohali closed this as completed May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants