readthedocs.org: rst-versions footer cannot be expanded when using sphinx_rtd_theme

Details

Expected Result

When clicking the injected rst-versions footer image while using sphinx_rtd_theme, the footer should expand and show content.

Actual Result

Page load causes the DOM to crash with the following error:

Uncaught TypeError: Cannot read property 'enable' of undefined
    at HTMLDocument.<anonymous> ((index):288)
    at f (jquery-2.0.3.min.js:3)
    at Object.fireWith [as resolveWith] (jquery-2.0.3.min.js:3)
    at Function.ready (jquery-2.0.3.min.js:1)
    at HTMLDocument.ge (jquery-2.0.3.min.js:1)

Line 288 is a script added during the RTD build, that seems to be for the Sphinx RTD theme:

<script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
</script>

SphinxRtdTheme.Navigation is supposedly undefined, and SphinxRtdTheme contains only one element; StickyNav. Removing the script, or replacing “Navigation” with “StickyNav” fixes this issue and allows the footer to be expanded as expected.

I wasn’t really sure whether this was an issue to open here or on the sphinx theme’s Github, but since building locally with this theme, the footer isn’t injected, I think this is the correct place.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 17 (8 by maintainers)

Most upvoted comments

@gasman yeah, this was from yesterday, the team is working on that right now

Yes, the static assets didn’t get built correctly and old static assets were used.

I’m glad we got this sorted out.

I believe this issue is resolved. I’m running a few tests but I believe this should be fixed. You may need to reload without cache (I’m working on that too).