Readthedocs.org: "Edit on GitHub" url broken for sphinx projects

Created on 28 Sep 2018  路  17Comments  路  Source: readthedocs/readthedocs.org

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.

Bug

Most helpful comment

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

All 17 comments

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

I have a PR that fixes this in #3525

@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.

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

@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.

I have a PR that fixes this https://github.com/rtfd/readthedocs.org/pull/4696, should be fixed in our next deploy.

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

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

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

It works fine now! Thanks a lot!

:tada: thanks for the quick fix :clap:

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!

Hello @stsewd

I am also facing exactly similar issue as shown in below comment::
https://github.com/rtfd/readthedocs.org/issues/4671#issuecomment-426211959

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?

@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.

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?

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

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SylvainCorlay picture SylvainCorlay  路  3Comments

davidfischer picture davidfischer  路  4Comments

humitos picture humitos  路  4Comments

adamjstewart picture adamjstewart  路  4Comments

pllim picture pllim  路  3Comments