Opened 13 years ago

Closed 10 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 by Aryeh Leib Taurog <vim@…>, 13 years ago

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 by Gabriel Hurley, 13 years ago

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

comment:3 by Aryeh Leib Taurog <vim@…>, 13 years ago

Cc: vim@… added

comment:4 by anonymous, 13 years ago

Severity: Normal
Type: Bug

comment:5 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:7 by Michał Pasternak, 10 years ago


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 by Ramiro Morales, 10 years ago

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