Opened 6 years ago

Closed 3 years ago

#14950 closed Bug (duplicate)

Javascript errors when building CHM file from django docs using Sphinx

Reported by: Aryeh Leib Taurog <vim@…> Owned by: nobody
Component: Documentation Version: 1.2
Severity: Normal Keywords: chm javascript
Cc: vim@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Sphinx 1.0.3
Python 2.5.2
Django 1.2.3 and 1.2.4

I tried generating a chm of the django documentation, but when I opened it, I got a js error 'jQuery' is undefined.
I can see that the only script referenced in the html is templatebuiltins.js, (it seems that is generated by a django extension which isn't used for htmlhelp).

I tried changing the link in the html files to point to a js bundle with the contents of the following files (in order):


I also threw in a declaration of django_template_builtins, but I'm still getting other errors. My guess is that most of the javascript isn't really necessary in the chm, which is very easy to navigate and search as is.

Ultimately, I just removed all the script tags from the html files and recompiled the chm.

I think it would be nice to be able to generate an error-free chm without so much effort.

Change History (8)

comment:1 Changed 6 years ago by Aryeh Leib Taurog <vim@…>

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

Looks like it is just a question of pointing the htmlhelp builder to a version of the layout.html template which doesn't contain the script tags.

Is there an easy way to specify different templates for different builders?

comment:2 Changed 6 years ago by Gabriel Hurley

Summary: Javascript errors in django docs chmJavascript errors when building CHM file from django docs using Sphinx
Triage Stage: UnreviewedAccepted

comment:3 Changed 6 years ago by Aryeh Leib Taurog <vim@…>

Cc: vim@… added

comment:4 Changed 6 years ago by anonymous

Severity: Normal
Type: Bug

comment:5 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:7 Changed 3 years ago by Michał Pasternak


I know, 3 years are a long time.

Anyways, here's a patch, that makes CHM compilation readily available out of box ,
and here's an issue I created for it

With kind regards,

comment:8 Changed 3 years ago by Ramiro Morales

Resolution: duplicate
Status: newclosed

I'm going to close this as duplicate of #21558 that, even if newer, has a patch and renewed energies.

Note: See TracTickets for help on using tickets.
Back to Top