-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
"edit on github" / "view on github" links for "stable" -> 404 #1820
Comments
it would seem more reliable to show a link to a branch there, it seems to me... |
55fef2457e483701254e5b2a7d4a1a60963971a8 is the hash of the 0.28.2 tag on github:
it seems that GH doesn't render that properly transparently, so it could be a github bug as well... |
Ah, interesting. I only looked in git log output for the hash, but the tags do not show up there. |
could somebody please have a look? |
This is ticket has not been triaged yet, as we have not had time to focus on this. Feel free to supply test cases or a patch that address the issue you are seeing. |
could this be fixed please? we get new tickets on our tracker all the time because "edit on github" is broken... could it be related to that I gpg-sign my release tags in git? |
I'm seeing the same problem with the files written in markdown in project using a mix of markdown and rST (the "edit on GitHub" links go to e.g. foo.rst when the page was generated from e.g. foo.md): |
@timabbott are you signing your release tags with gpg, too? |
well, i don't know about others but this is fixed here. the original post here says that the stable release page leads to a 404 page (which is still 404). but the stable page now points to a different page which works fine. also, tagged releases work fine too: they leads to a working link. i wonder if github's support for signed commits fixed this or something. anyways, it looks to me like the original issue is fixed. @timabbott's issue seems related not to git tags but to the markdown/rst mix, an issue that should be fixed on RTFD's side, not github. |
@anarcat right, it works now for our stable tag. \o/ thus, I am closing this one - please file different bugs in a different issue. |
Sounds reasonable, opened #2130 for the markdown issue -- I hadn't realized it was a different bug. Thanks! |
Hmm, the issue seems to have come back: http://borgbackup.readthedocs.io/en/stable/index.html "edit on github" points to: ... which is 404. |
I've also seen this. http://kinto.readthedocs.io/en/stable/ "edit on github" points to https://github.com/Kinto/kinto/blob/9c331e13643a53ca76208f4efa6c9bb651b165b4/docs/index.rst , which 404s. Like @anarcat said, the hash shown is the hash of the tag, rather than that of the commit. Looking at http://readthedocs.org/api/v1/version/1957996/?format=json, I see the problematic hash listed as the "identifier". |
BTW, how about a setting whether one wants to have "edit on github" links or not? I'ld just switch it off so we would never have to bother with it again. We have a link to github in our docs, so we don't really need that extra link. ;-) |
@ThomasWaldmann your last command should be in another issue I believe ;) Regarding the issue at hand, i've investigated a bit, and here are my findings: This will return the So maybe we could store the branch name instead of the tag hash (which seems useless in our case?) in the This should be done in the I'll submit a PR with this naive fix, to open up the discussion. |
This has been fixed (see http://mockingjay.readthedocs.io/en/stable/ -- it properly links to the hash of the commit on github) |
@ericholscher click on first link in top post, then on "edit on github". |
this is not fixed. i still see this problem all the time. it could be a bug with github that doesn't properly recognize certain hashes, but it's still a problem regardless. |
Where did the commit Either that, or we have a bug that is pulling tags in from random places. |
it's not a commit, it's a tag, and it's the whole bug here - github doesn't display tag hashes correctly when you ask them as commits:
so either you:
|
Testing a version Reopening. |
can we just remove (or disable by default) the annoying / buggy features like this or that "outdated library version" note? the problem is not just that readers encounter these bugs and report them HERE, they also frequently report them at the documented software project, causing work for the maintainers of these. and once you have explained it to one user who found it, the next one will find it and open another issue... |
@agjohnson I have the exact same symptoms in e.g. https://restic.readthedocs.io/en/stable/040_backup.html. I have asked the project owner of restic to trigger a rebuild of the docs, but haven't heard from him yet on whether or not he did that. Would be great if stable just pointed to the last release tag instead, that would have solved it by now. |
That's because commits nor tags can't be edited. So I think this is kind of another issue (hide the |
@stsewd has a good point, one cannot edit tags either. So at the GitHub end we're left with the branches that exist in the repo. Usually this is master and perhaps some other dev branches. In order for the edit link to have a purpose, perhaps it simply needs to point to the main branch at all times, regardless of which version you are looking at in RTD? How to deduct/define the "main" branch is another question though. Maybe the answer to it lies in just looking at what branch the Latest version corresponds to. EDIT: Then again; What happens on GitHub is a separate concern. Perhaps RTD did what it's supposed to do by linking to the proper file in the proper commit/tag/branch, and that's the end of it, in the sense that it's then up to the user to create a branch from that commit/tag if they want to edit. Just like the "Fork me on GitHub" links on project pages just goes to the original repository, instead of actually starting to fork the original repo into the user's GitHub account. |
The restic doc project was rebuilt in RTD, but the same state still applies, for obvious reasons. Not much else we can do about it suppose :) Thanks for your hard work! |
I am +1 on reticketing the issue. There were some changes since 2015 and the info needs to be researched again. |
Yeah, I don't think this is a bug, is more like an improvement, and it needs a design decision about how to deal with links to no editable versions (tags). |
On my deployment, it wouldn't even work on |
@stsewd are you sure looking at the BitShares docs:
|
@techtonik @xeroc that's another bug, please see #4671 |
thanks for the link. |
So, I just discovered that we have this, It was added here 4619c82#diff-4ade07b2b17f38e60bfcb27301c99934 The commit msg describes what we are seeing now. But it was never used on the conf.py context. Anyway, I think we can use that now in the flyout menu with github and friends |
Sorry to necro this, perhaps I should open a new issue, but can I ask whether this was reverted, or otherwise whether everyone else sees this working? I'm finding this issue after essentially seeing the same behavior on https://docs.bowtie.report/ (AKA https://bowtie-json-schema.readthedocs.io) -- it's broken on stable, working on latest, and we indeed use annotated tags (which is what it looks like the stable 404 is trying to point to). I indeed would be 100% fine with Thomas' suggestion (always have edit links point to latest), but just trying to figure out whether there's a regression or otherwise what I should expect to see at this point. EDIT: to not re-ping anyone, it seems the actual issue here is pradyunsg/furo#668 as of course obvious in retrospect is that this is theme specific! |
@Julian please open a new issue with all the details. |
See https://pradyunsg.me/furo/customisation/edit-button/ Evades the (currently open) pradyunsg/furo#668. Closes: #979 Refs: pradyunsg/furo#668 Refs: readthedocs/readthedocs.org#1820
See there:
http://borgbackup.readthedocs.org/en/stable/
Link at top right points to:
https://github.com/borgbackup/borg/blob/55fef2457e483701254e5b2a7d4a1a60963971a8/docs/index.rst
(which is 404)
Same for the view/edit links in the bottom left box, they also point to same 404 location.
OTOH, the docs shown for "stable" are (currently) correctly showing 0.28.2 release, which is the latest release.
I tried a "stable" rebuild, did not help.
The text was updated successfully, but these errors were encountered: