[BUG] JS errors on Bokeh docs page
cdeil opened this issue · comments
Software versions
See your docs build
Browser name and version
Chrome Version 123.0.6312.59 (Official Build) (arm64)
Expected behavior
Docs page search field works
Observed behavior
Docs page search field in top right doesn't work.
Example code
- Go to https://docs.bokeh.org/en/latest/
- Open browser dev tools
- Reload page and observe errors
- Search field in top right doesn't work
Stack traceback or browser console output
custom.js?v=22a1fd09:11 Uncaught ReferenceError: $ is not defined
at custom.js?v=22a1fd09:11:1
(anonymous) @ custom.js?v=22a1fd09:11
pydata-sphinx-theme.js:54 [PST]: Changed to light mode using the light theme.
pydata-sphinx-theme.js:570 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'classList')
at T (pydata-sphinx-theme.js:570:5)
at r (mixin.js:11:41)
at pydata-sphinx-theme.js:584:1
T @ pydata-sphinx-theme.js:570
r @ mixin.js:11
(anonymous) @ pydata-sphinx-theme.js:584
await in (anonymous) (async)
c.a @ async module:49
937 @ pydata-sphinx-theme.js?digest=8d27b9dea8ad943066ae:1
c @ bootstrap:19
(anonymous) @ startup:4
(anonymous) @ pydata-sphinx-theme.js?digest=8d27b9dea8ad943066ae:1
pydata-sphinx-theme.js:200 Uncaught TypeError: Cannot read properties of null (reading 'querySelector')
at c (pydata-sphinx-theme.js:200:17)
at pydata-sphinx-theme.js:237:19
c @ pydata-sphinx-theme.js:200
(anonymous) @ pydata-sphinx-theme.js:237
Screenshots
This is some issue with the Sphinx theme, not Bokeh itself.
@choldgraf any thoughts on what could be going amiss (or who is the best person to ask these days)?
cc @tcmetzger
I'd recommend opening an issue in the pydata-sphinx-theme repository in case it's a problem over there. It looks like the HTML structure has changed and the JS selector didn't change to accommodate it, but I haven't been following the development too closely so don't know where the problem may be
@mosc9575 before we make an issue over there, do you have any bandwidth for a quick look? Does this reproduce locally, and if so does a simple change like updating the theme version fix things?
Only the search button on the start page is broken. The button works on other pages like first steps and gallery and I don't understand why. I also think that the posted JS error is unrelated, because it also appears on pages with working search button.
The error in the browser console comes from the version banner and I don't know how to fix it. See
bokeh/docs/bokeh/source/_static/custom.js
Lines 10 to 26 in e380566
I also build the docs on my local machine with pydata-sphinx-theme 0.15.2 and 0.15.3dev0 and I can't see if it works, because the search button is broken for local pages. There is an older issue 1654 which could be related.
Just noting that I believe version warning banners are now built into the theme, so you could try using that and see if that removes the error
Still the same error. Re-open and close when it's fixed?
@cdeil issues are closed when fixes are merged, which does not mean the fix is published in any release yet.