Skip to content
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

links to github are broken #3203

Closed
cokelaer opened this issue Oct 27, 2017 · 18 comments
Closed

links to github are broken #3203

cokelaer opened this issue Oct 27, 2017 · 18 comments
Assignees
Labels

Comments

@cokelaer
Copy link

@cokelaer cokelaer commented Oct 27, 2017

Details

  • Project URL: sequana.readthedocs, bioservices.readthedocs, bioconvert.readtheodocs and more
  • Build URL (if applicable): http://sequana.readthedocs.io/en/master/
  • Read the Docs username (if applicable): cokelaer

Expected Result

link should work (there were working)

Actual Result

links broken due to additional "origin" added in the links to github.

@agjohnson agjohnson added the Bug label Oct 28, 2017
@dlech
Copy link

@dlech dlech commented Oct 28, 2017

@leastprivilege
Copy link

@leastprivilege leastprivilege commented Nov 29, 2017

We have the same issue

https://identityserver4.readthedocs.io/en/release/

any comment on this? Can we fix that somehow ourselves?

@cokelaer
Copy link
Author

@cokelaer cokelaer commented Nov 29, 2017

AFAIC, the problem is still there for the projects mentioned above.

@humitos
Copy link
Member

@humitos humitos commented Nov 29, 2017

I think this is the PR that fixes this issue: #3302

@benjaoming
Copy link
Contributor

@benjaoming benjaoming commented Dec 7, 2017

@humitos I think this issue is specifically about the local remote alias being added to the version name, Github knows nothing of origin/ which is currently part of github_version being used in the template.

@humitos humitos self-assigned this Dec 18, 2017
@humitos
Copy link
Member

@humitos humitos commented Dec 19, 2017

I've trying to reproduce this bug in my local instance using the sequana project but I wasn't able yet. On one hand, the commit_name property used in all the Version objects is correct and on the other hand, I wasn't able to build the documentation because the project fail with an issue that's not related to RTD. @cokelaer please, let me know when I can get a success build and I will try again with this project.

I will try to debug this issue again with the other projects linked in this ticket (probably tomorrow) and I will comment here the results. Thanks for the reports.

@benjaoming
Copy link
Contributor

@benjaoming benjaoming commented Dec 19, 2017

@humitos here are some examples of live projects with broken Edit buttons:

http://django-wiki.readthedocs.io/en/master/
http://discretize.simpeg.xyz/en/master/

@cokelaer
Copy link
Author

@cokelaer cokelaer commented Dec 20, 2017

Bioservices project has the Same issue and may be easier to install or one of the projet that @benjaoming just mentionned. I believe the issues are all related. Could be pbl with à newer version of sphinx maybe?

@humitos
Copy link
Member

@humitos humitos commented Dec 20, 2017

OK, I think I have "something to say" after my little research.

It seems that this only happens with the master branch. I just built django-wiki and discretize both using latest version and links works properly. Then I activated the master branch on those projects and the Github link start pointing to the wrong link (adding the "origin" to the URL).

This is happening because in the Version.commit_name the value of self.type is unknown and it doesn't enter to this if, https://github.com/rtfd/readthedocs.org/blob/6fd828216fede4a64259c5d5f199f8e4fd5163e1/readthedocs/builds/models.py#L139
so it returns self.identifier which is origin/master.

Now, I need to find/understand why the Version is detected as unknown instead of a branch.

@humitos
Copy link
Member

@humitos humitos commented Dec 20, 2017

Sorry, I got confused with discrete. It's using the dev branch as latest and it's has the problem with the links to GH on that branch. It doesn't have the problem in stable.

humitos added a commit that referenced this issue Dec 20, 2017
Since the `type` wasn't in the response when syncing version and
retrieving this data the `APIVersion.type` was returning `UNKNOWN`
and then the `APIVersion.commit_name` was incorrect.

By adding the `type` to the API response the `Version` it's completed.

#3203
@humitos
Copy link
Member

@humitos humitos commented Dec 20, 2017

I just propose a PR at #3427 that should fix this issue.

@humitos
Copy link
Member

@humitos humitos commented Dec 21, 2017

Hi all! The PR was already deployed. Can you rebuild your projects and let me know if it works as you expects? Thanks!

@dlech
Copy link

@dlech dlech commented Dec 21, 2017

After a wipe and a build, it looks like my link above is working correctly.

@benjaoming
Copy link
Contributor

@benjaoming benjaoming commented Dec 22, 2017

Works for me, too -- no need to "wipe" first, worked on first rebuild 🎉

Great work @humitos !

@cokelaer
Copy link
Author

@cokelaer cokelaer commented Dec 22, 2017

Same for bioconvert.readthedocs.io without a wipe
thanks.

@humitos
Copy link
Member

@humitos humitos commented Dec 22, 2017

Thank you all for testing, reporting, etc.

The issue was closed automatically when the PR was merged but I wanted confirmation from your side.

@paulmeems-waterwatchfoundation

I know this issue is closed, but I'm facing the same problem.
Not sure if I should create a new issue.

My project: http://datastandard.globalcoffeeplatform.org
The 'Edit on GitHub' points to
https://github.com/globalcoffeeplatform/CoffeeDataStandard/blob/origin/master/docs/source/index.rst
but it should point to
https://github.com/globalcoffeeplatform/CoffeeDataStandard/blob/master/docs/source/index.rst
Without the 'origin' part.

I've rebuild several times. Perhaps I need a different version of some tool?
I'm using Spinx v1.8.4 and sphinx-rtd-theme v0.4.2
Here's my latest build result: https://readthedocs.org/api/v2/build/8790271.txt

@stsewd
Copy link
Member

@stsewd stsewd commented Mar 21, 2019

@paulmeems-waterwatchfoundation can you open a new issue? I think I know where the problem is, I'm not in the computer now to confirm.

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

Successfully merging a pull request may close this issue.

8 participants