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

"Edit on GitHub" url broken for sphinx projects #4671

Closed
sualko opened this issue Sep 28, 2018 · 17 comments
Closed

"Edit on GitHub" url broken for sphinx projects #4671

sualko opened this issue Sep 28, 2018 · 17 comments
Labels
Bug A bug

Comments

@sualko
Copy link

sualko commented Sep 28, 2018

Details

Expected Result

"Edit on GitHub", "View on GitHub" and so on should link to https://github.com/jsxc/documentation.

Actual Result

Those links points to https://github.com/jsxc/documentation/blob/master/home/docs/checkouts/readthedocs.org/user_builds/jsxc/checkouts/latest/conf.py/index.rst

As you can see the string /home/docs/checkouts/readthedocs.org/user_builds/jsxc/checkouts/latest/conf.py is added to the url. The only thing that I can think of, is that I have currently no tags in my repo. Maybe this is the reason, I don't know.

@stsewd
Copy link
Member

stsewd commented Sep 28, 2018

Thanks for the report, this is a duplicate of #1917

I have a PR that fixes this in #3525

@stsewd stsewd closed this as completed Sep 28, 2018
@pdavide
Copy link

pdavide commented Sep 28, 2018

@stsewd I don't think this is a duplicate issue as this bug is appearing in sphinx based projects too.
In the #4482 the value for conf_py_path is changed from a relative to an absolute path. This is passed to the sphinx build context and then used in the readthedocs default theme to generate the "Edit on [VCS]" link.
This is also documented in: https://docs.readthedocs.io/en/latest/vcs.html?highlight=conf_py_path
Maybe you need an absolute path here, but we also need to provide a relative path in the checkout to the docs root in order to generate a correct "Edit on [VCS]" link.

@stsewd
Copy link
Member

stsewd commented Sep 28, 2018

oops, didn't see that your project is sphinx type. Yeah, that's a bug

@stsewd stsewd reopened this Sep 28, 2018
@stsewd stsewd added the Bug A bug label Sep 28, 2018
@stsewd stsewd changed the title "Edit on GitHub" url broken "Edit on GitHub" url broken for sphinx projects Sep 28, 2018
@pdavide
Copy link

pdavide commented Sep 28, 2018

@stsewd that's not my project, I just noticed the same bug in a sphinx based project and commented this same issue instead of opening a new one.
Thanks for your commitment.

@leastprivilege
Copy link

I can confirm that we have the same issue with Sphinx.

https://identitymodel.readthedocs.io/en/latest/client/discovery.html
edit points to
https://github.com/IdentityModel/IdentityModel2/blob/master/home/docs/checkouts/readthedocs.org/user_builds/identitymodel/checkouts/latest/docs/conf.py/client/discovery.rst

@stsewd
Copy link
Member

stsewd commented Oct 2, 2018

I have a PR that fixes this #4696, should be fixed in our next deploy.

@francescozaia
Copy link

Is there an expected timeframe for the next deploy? Sorry to bother but this is affecting some of our docs. Thanks!

@stsewd
Copy link
Member

stsewd commented Oct 3, 2018

We don't have a schedule for deploys, but I'd say next week or so

@ericholscher
Copy link
Member

This should now be deployed. It will likely require a doc rebuild to fix.

@francescozaia
Copy link

francescozaia commented Oct 4, 2018

It works fine now! Thanks a lot!

@sualko
Copy link
Author

sualko commented Oct 4, 2018

🎉 thanks for the quick fix 👏

@fv3rdugo
Copy link

fv3rdugo commented Oct 5, 2018

We use the default template, it has been necessary to modify a file and when it has been rebuild it has worked. The links to Edit Github are ok. Thanks!

@iamarnavgarg
Copy link

Hello @stsewd

I am also facing exactly similar issue as shown in below comment::
#4671 (comment)

The docs are made in sphinx. When we click on "Edit on Github" link it reports link error.
What changes do I need to make/overrride this functionality, so that it could be done?

@stsewd
Copy link
Member

stsewd commented Nov 28, 2018

@iamarnavgarg hi, you should only need to trigger a new build on the affected version, you can do this from the Build section of your project's dashboard.

@iamarnavgarg
Copy link

Thanks @stsewd . While building the project using make html and writing breadcrumbs.html for broken links returns the following error:

Theme error:
An error happened in rendering the page contents.
Reason: RuntimeError('maximum recursion depth exceeded',)
make: *** [html] Error 2

Can you please suggest where I am going wrong?

@stsewd
Copy link
Member

stsewd commented Nov 30, 2018

Can you please point me to the project? Why do you need to override breadcrumbs.html?

@iamarnavgarg
Copy link

Hi @stsewd I have overcome the issue. Thanks for help!
However, I am not able to understand the purpose of the following lines in sphinx_rtd_theme

  1. Line 41
  2. Line 61
  3. Line 63

Can you please help me in it?

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

No branches or pull requests

8 participants