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

Unusable Search utility with sphinx=6.1.3 #1451

Closed
valeriupredoi opened this issue Mar 29, 2023 · 11 comments
Closed

Unusable Search utility with sphinx=6.1.3 #1451

valeriupredoi opened this issue Mar 29, 2023 · 11 comments

Comments

@valeriupredoi
Copy link

Hey guys, first off many thanks for a great theme! We've been using it for a long while now, as well as many other software packages - great work!

Second - the meat of the issue: we've discovered that the Search utility doesn't work no more - it shows "Searching..." but that never ends, it keeps going ad infinitum. This is happening with sphinx=6.1.3 (latest) and any sphinx_rtd_theme (currently that's 1.2.0), both installed from conda-forge. With an older sphnix, and our RTD env builder picks only sphinx=5.0, even though there are slightly newer, and any sphinx_rtd_theme (I tested 1.1.1 and 1.2.0) makes the problem go away and the search works as expected. I reckon there is some form of budgery going on there at the interface - we have now pinned sphinx in our env so we don't pick up this problem anymore, but it'd be good if you could look into it so the theme works well with the latest sphinx. Let me know if I can help in any way! More details below:

Cheers 🍺

@benjaoming
Copy link
Contributor

Hi @valeriupredoi 👋

Thanks for the report!

  • Can you use the web developer tools in your browser to test if this is because jQuery isn't loaded? You could check if $ is defined or see if there are JavaScript errors that indicate this issue.

  • Does Sphinx 6.1.0 and 6.0.x produce the same results?

@valeriupredoi
Copy link
Author

hi @benjaoming many thanks for getting back, mate! Indeed I see quite a few errors - related to jQuery (I think, sorry, am pretty obtuse when it comes to web devel), see attached log
console-export-2023-3-30_11-42-18.txt

@valeriupredoi
Copy link
Author

let me get back to you about sphinx versions 6.x.x, <6.1.3 - I need to rerun the builds 👍

@benjaoming
Copy link
Contributor

Yup, it's jQuery that is not loaded... Uncaught ReferenceError: jQuery is not defined

After looking at your configuration, it see that you're probably affected by #1448

The workaround is to add sphinxcontrib.jquery to extensions in conf.py

I'm gonna close this, but feel free to reopen if the workaround doesn't work 👍

@valeriupredoi
Copy link
Author

great! Many thanks, mate! I shall do that, then retest, then either come back with a 🍺 or reopen 😁

@benjaoming
Copy link
Contributor

haha cheers 🍺

@valeriupredoi
Copy link
Author

incidentally, I managed to test with sphinx=6.0.0 before you gave me the workaround - see build - and it's the same story, so it appears any sphinx>=6 is buggering us up 👍

@benjaoming
Copy link
Contributor

it's complicated :)

@valeriupredoi
Copy link
Author

you, sir, are a legend - the build with latest sphinx and the additional extension is now working very well, and the Search works too, many thanks 🍺 (see https://readthedocs.org/projects/esmvaltool/builds/19956050/ )

@benjaoming
Copy link
Contributor

THANKS! And thanks for the great feedback. I'm sorry that tool upgrades are sometimes annoying like this. But we have the fix ready, so hopefully we can get it finished and released soon.

I opened #1452 so hopefully it's easy for others to find and solve similar cases until then 👍

Very nice project btw! Thank you for doing important work to understand climate change 🙏

@valeriupredoi
Copy link
Author

many thanks @benjaoming - no problemo about new pkgs etc, that's why we have these issues for, and it's always a pleasure to work with devs like you: responsive, and with a fix at ready! A virtual 🍺 to you mate

RobbenRoll added a commit to RobbenRoll/emgfit that referenced this issue Jan 21, 2024
* Added sphinxcontrib.jquery to sphinx extensions to repair search functionality as suggested in readthedocs/sphinx_rtd_theme#1451
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants