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
Search does not work for docs built with 1.8.0 #5460
Comments
Sorry, I can't reproduce the error. Could you share your project or reproducible example please? |
I am able to reproduce using: https://github.com/dkliban/pulp/tree/broken-sphinx However, I just realized that this only occurs when using the 'sphinx-rtd-theme'. After I uninstalled 'sphinx-rtd-theme' the problem goes away. Should I file the bug with https://github.com/rtfd/sphinx_rtd_theme ? |
To see this bug in action, see the matplotlib search (as long as this isn't reverted to use sphinx 1.7.9). The error seems to be
As far as I can tell matplotlib does not use the 'sphinx-rtd-theme'; but of course some other customization that is done may be responsible, maybe an old jquery in use? |
@dkliban Thank you for comment. I reproduced this. Note: This was added in #5207. It updated |
It seems sphinx 1.8.1 is out without this being fixed. Could someone comment on the solution here? It looks like the searchtools.js needs some variables from another javascript and currently the user is resposible for including that other javascript? Is this documented somewhere? |
The variables are defined in Until merging readthedocs/sphinx_rtd_theme#672 , you need to pin Sphinx==1.7.9 or customize the theme manually. |
sphinx_rtd_theme and matplotlib are not the only themes that got broken with this. Another example is scipy/scipy-sphinx-theme#9, and I think there will be other examples of breakage. Maybe it's possible to add a fallback for such themes, like we did in past (e.g. #4107)? |
I will take a look. Should be possible for me to add such a fallback, if this is okay with you. |
* Inject ``documentation_options.js`` script as part of HTML build * Set attributes of the script accordingly * Remove script reference from basic template (would be duplication) * Add fallback for URL_ROOT variable
This file is included in script_files, so it will be present even for projects using custom templates. Fixes sphinx-doc#5460.
There is a new pull request in #5590. Any testing is appreciated. Please consider assigning it to 1.8.2 milestone. |
See discussion: * Edit template: https://stackoverflow.com/questions/52474177/read-the-docs-search-broken * Previous version of the bug: sphinx-doc/sphinx#5460 * Fix: HangfireIO/Hangfire.Documentation@de122cc
Subject: Docs built with sphinx 1.8.0 have broken search
Problem
Procedure to reproduce the problem
Expected results
Search works
Environment info
The text was updated successfully, but these errors were encountered: