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

jQuery not loaded automatically with sphinxcontrib-jquery 4.0.0 #1452

Closed
benjaoming opened this issue Mar 30, 2023 · 12 comments · Fixed by #1448
Closed

jQuery not loaded automatically with sphinxcontrib-jquery 4.0.0 #1452

benjaoming opened this issue Mar 30, 2023 · 12 comments · Fixed by #1448
Labels
Bug A bug

Comments

@benjaoming
Copy link
Contributor

Symptom

Uncaught ReferenceError: jQuery is not defined

Issue

Sphinx signal config-inited has probably already been called when we try to add a hook.

Fixed by

#1448

Workaround

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

@stsewd
Copy link
Member

stsewd commented Mar 30, 2023

A workaround is to add this in your conf.py file.

extensions = [
    "sphinxcontrib.jquery",
]

And there is no need to install the dependency, since the theme already installs it.

@benjaoming
Copy link
Contributor Author

@stsewd that's a clarification of the description content?

@stsewd
Copy link
Member

stsewd commented Mar 30, 2023

@benjaoming just a workaround for users hitting this problem, feel free to put that in the description!

@benjaoming
Copy link
Contributor Author

@stsewd it was already there, so I was confused if you were writing it differently :)

@stsewd
Copy link
Member

stsewd commented Mar 30, 2023

oh, missed that!

@maxgerhardt
Copy link

Also just hit this error and #1452 (comment) solved the issue.

skirpichev added a commit to skirpichev/diofant that referenced this issue Apr 11, 2023
douglas-raillard-arm added a commit to douglas-raillard-arm/lisa that referenced this issue Apr 13, 2023
douglas-raillard-arm added a commit to ARM-software/lisa that referenced this issue Apr 13, 2023
dfelinto pushed a commit to dfelinto/blender-manual that referenced this issue Apr 21, 2023
The current theme requires `sphinxcontrib.jquery` to perform search.
There is an unresolved bug [1] that results in this extension not loading automatically.

1. readthedocs/sphinx_rtd_theme#1452


git-svn-id: https://svn.blender.org/svnroot/bf-manual/branches/blender-3.5-release/blender_docs@10116 c4de1f47-6596-e411-a384-0024e86c2797
EwoutH added a commit to quaquel/EMAworkbench that referenced this issue Apr 24, 2023
EwoutH added a commit to quaquel/EMAworkbench that referenced this issue Apr 24, 2023
This commit fixes search by adding a workaround to the Readthedocs configuration.

For the workaround see readthedocs/sphinx_rtd_theme#1452 (comment)
manu0x0 pushed a commit to isc-projects/bind9 that referenced this issue Aug 29, 2023
To resolve the version select and search issue on readthedocs.org,
sphinx_rtd_theme>=1.2.1 is required.

Related readthedocs/sphinx_rtd_theme#1452

(cherry picked from commit 92143fa)
manu0x0 pushed a commit to isc-projects/bind9 that referenced this issue Aug 29, 2023
To resolve the version select and search issue on readthedocs.org,
sphinx_rtd_theme>=1.2.1 is required.

Related readthedocs/sphinx_rtd_theme#1452

(cherry picked from commit 92143fa)
andreasabel added a commit to agda/agda that referenced this issue Sep 5, 2023
andreasabel added a commit to agda/agda that referenced this issue Sep 5, 2023
andreasabel added a commit to agda/agda that referenced this issue Sep 5, 2023
This addresses a regression in `sphinx_rtd_theme` that causes `sphinxcontrib.jquery` to be not loaded.
Consequently, the search page seems to be hanging; the cause is that `jQuery` is undefined.
Adding `sphinxcontrib.jquery` is a suggested workaround at readthedocs/sphinx_rtd_theme#1452.

Since I see another problem with search locally and in the PR build on rtd.org, I bump to the latest `Sphinx` and `sphinx_rtd_theme`.  This doesn't fix the problem, though.  However, rtd.org seems to be fine with these requirements.
The problem I have been seeing is a `undefined` sprinkled in the `requestUrl` variable in Sphinx's `searchtools.js` which causes page loads to fail for previewing the search hits.  Maybe this problem will disappear in the regular build on rtd.org.

Squashed commits:

* Fix search on readthedocs.org by bumping sphinx_rtd_theme to 1.2.2

1.2.2 includes PR 1448 which fixes issue 1452

- readthedocs/sphinx_rtd_theme#1448
- readthedocs/sphinx_rtd_theme#1452

* Fixup: remove `html_theme_path`

Suggested in readthedocs/sphinx_rtd_theme#1452 (comment)

* Fixup 2: or, add 'sphinxcontrib.jquery' to 'extensions'

* Fixup 3: bump to latest Sphinx and rtd theme
kccwing referenced this issue in ImperialCollegeLondon/sharpy Oct 18, 2023
jieter added a commit to jieter/django-tables2 that referenced this issue Nov 13, 2023
jieter added a commit to jieter/django-tables2 that referenced this issue Nov 13, 2023
cznic-knotbot pushed a commit to CZ-NIC/knot-resolver that referenced this issue Jan 9, 2024
This works around cases where Sphinx does not add jQuery automatically
on some local setups <readthedocs/sphinx_rtd_theme#1452>.
cznic-knotbot pushed a commit to CZ-NIC/knot-resolver that referenced this issue Jan 9, 2024
This works around cases where Sphinx does not add jQuery automatically
on some local setups <readthedocs/sphinx_rtd_theme#1452>.
johnbywater added a commit to pyeventsourcing/eventsourcing that referenced this issue Jan 21, 2024
kdesysadmin pushed a commit to KDE/documentation-docs-kdenlive-org that referenced this issue Feb 17, 2024
kdesysadmin pushed a commit to KDE/digikam-doc that referenced this issue Mar 4, 2024
kgugala added a commit to antmicro/fomu-workshop that referenced this issue Mar 17, 2024
As per: readthedocs/sphinx_rtd_theme#1452

Signed-off-by: Karol Gugala <kgugala@antmicro.com>
kgugala added a commit to antmicro/fomu-workshop that referenced this issue Mar 17, 2024
As per: readthedocs/sphinx_rtd_theme#1452

Signed-off-by: Karol Gugala <kgugala@antmicro.com>
JobPetrovcic pushed a commit to JobPetrovcic/agda that referenced this issue Apr 12, 2024
This addresses a regression in `sphinx_rtd_theme` that causes `sphinxcontrib.jquery` to be not loaded.
Consequently, the search page seems to be hanging; the cause is that `jQuery` is undefined.
Adding `sphinxcontrib.jquery` is a suggested workaround at readthedocs/sphinx_rtd_theme#1452.

Since I see another problem with search locally and in the PR build on rtd.org, I bump to the latest `Sphinx` and `sphinx_rtd_theme`.  This doesn't fix the problem, though.  However, rtd.org seems to be fine with these requirements.
The problem I have been seeing is a `undefined` sprinkled in the `requestUrl` variable in Sphinx's `searchtools.js` which causes page loads to fail for previewing the search hits.  Maybe this problem will disappear in the regular build on rtd.org.

Squashed commits:

* Fix search on readthedocs.org by bumping sphinx_rtd_theme to 1.2.2

1.2.2 includes PR 1448 which fixes issue 1452

- readthedocs/sphinx_rtd_theme#1448
- readthedocs/sphinx_rtd_theme#1452

* Fixup: remove `html_theme_path`

Suggested in readthedocs/sphinx_rtd_theme#1452 (comment)

* Fixup 2: or, add 'sphinxcontrib.jquery' to 'extensions'

* Fixup 3: bump to latest Sphinx and rtd theme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants