sphinx-doc / sphinx-doc/sphinx

Error: Invalid CSS selector in bizstyle.js

Open
#11,073 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

html theme type:regression
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Google Chrome 108.0.5359.124:

Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Document': 'div.related:first ul li:not(.right) a' is not a valid selector.
    at HTMLDocument.initialiseBizStyle (file:///Users/phprus/....../build/html/_static/bizstyle.js:21:14)
initialiseBizStyle @ bizstyle.js:21

and

Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Document': 'div.related:last ul li:not(.right) a' is not a valid selector.

FireFox 108.0.1:

Uncaught DOMException: Document.querySelectorAll: 'div.related:first ul li:not(.right) a' is not a valid selector bizstyle.js:21
    initialiseBizStyle file:///Users/phprus/....../build/html/_static/bizstyle.js:21
How to Reproduce
$ echo "Content demonstrating the bug..." > index.rst
$ echo "html_theme = 'bizstyle'" > conf.py
$ sphinx-build -M html . _build
$ # open _build/html/index.html and see exception on browser console
Environment Information
Platform:              darwin; (macOS-12.6.2-arm64-arm-64bit)
Python version:        3.11.0 (main, Oct 25 2022, 13:57:33) [Clang 14.0.0 (clang-1400.0.29.202)])
Python implementation: CPython
Sphinx version:        5.3.0
Docutils version:      0.19
Jinja2 version:        3.1.2
Sphinx extensions

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with index.rst and conf.py using sphinx-build, then inspect build/html/_static/bizstyle.js at line 21 and the source for the bizstyle theme. Confirm the generated page loads without querySelectorAll selector errors in Chrome and Firefox.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.