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

initNavTree('...',''); call causes script failure in Windows' .chm viewer (Origin: bugzilla #638829) #4079

doxygen opened this Issue Jul 2, 2018 · 0 comments


None yet
1 participant

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component build for ---
Reported in version 1.7.3 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2011-01-06 14:06:24 +0000, Bernd Giesen wrote:

Created attachment 177656
Screenshot demonstrating the script error (only in German, sorry)

Attempting to open a .chm target file, which was created by (official) doxygen 1.7.3, always causes a script failure in Window's .chm viewer (see screenshot). Furthermore, this error occurs everytime, when another page is opened (always while calling their initNavTree(...) script). doxygen v1.7.2 works well using the same sourcecode base by creating a .chm file, which could always successfully be opened without any error.

See the attached screenshot, where the error is reported for line 41 in the file "index.html" (which is the initNavtree('...', ''); call).

The error is reproducable independent of the Windows OS version.

On 2011-01-06 15:31:40 +0000, Dimitri van Heesch wrote:

Does it make a difference if you enable or disable the GENERATE_TREEVIEW option?

Can you please attach a self-contained example (source+config file in a tar or zip) that allows me to reproduce the problem?

On 2011-01-07 08:01:58 +0000, Bernd Giesen wrote:

Created attachment 177718
Doxygen project demonstrating the bug


in the attached demo project, the error is now reported for line 22 in index.html. I figured out, that it only then occurs as long as I'm using a header file (here: header.html) in the project. If you empty the "HTML_HEADER" tag in the configuration file, all works as expected...

On 2011-01-07 08:06:22 +0000, Bernd Giesen wrote:

If I set the GENERATE_TREEVIEW tag to "NO", the error does NOT occur!

On 2011-01-09 09:10:15 +0000, Dimitri van Heesch wrote:

If you use a custom HTML header then you are responsible to include the required scripts in that header. For the treeview there is now a navtree.js script required that defines the initNavTree() function.

What I typically advice is to use doxygen with the -w option to generate a template header and then modify that.

I will add a note to the documentation of HTML_HEADER to make this more explicit.

On 2011-01-22 11:06:07 +0000, Stefan wrote:


The navtree.js file is not listed in the default header using the -w argument.

Command line used: doxygen -w html header.html footer.html stylesheet.css

If added manually the browser does still not display the tree and barks on the following line in navtree.js:


The error message is: $ is not defined.

I have never seen the $-sign being used in JS scripts, might be a left-over from the Perl script.


On 2011-01-22 11:56:57 +0000, Dimitri van Heesch wrote:

Hi Stefan,

You should let doxygen process the config as well, i.e. add your config file as the last parameter of the -w option.

The $ function is very common in javascript when using jquery (see

On 2011-01-22 12:13:11 +0000, Stefan wrote:


Thanks for the hint about the config file, this made a big difference.

We are using doxygen since v1.6.2, but the upgrade from 1.7.2 to 1.7.3 is not really smooth.

Since you are at updating the documentation I would request the following change:

Chapter "doxygen usage":

Change from "doxygen -w html header.html footer.html stylesheet.css"
to "doxygen -w html header.html footer.html stylesheet.css <config_file>"

The config file place-holder is missing from the other -w examples too.

Thanks in advance,

On 2011-03-28 14:18:44 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.4. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment