After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 638829 - initNavTree('...',''); call causes script failure in Windows' .chm viewer
initNavTree('...',''); call causes script failure in Windows' .chm viewer
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: build
1.7.3
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-01-06 14:06 UTC by Bernd Giesen
Modified: 2011-03-28 14:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot demonstrating the script error (only in German, sorry) (48.25 KB, image/jpeg)
2011-01-06 14:06 UTC, Bernd Giesen
Details
Doxygen project demonstrating the bug (206.44 KB, application/zip)
2011-01-07 08:01 UTC, Bernd Giesen
Details

Description Bernd Giesen 2011-01-06 14:06:24 UTC
Created attachment 177656 [details]
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.
Comment 1 Dimitri van Heesch 2011-01-06 15:31:40 UTC
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?
Comment 2 Bernd Giesen 2011-01-07 08:01:58 UTC
Created attachment 177718 [details]
Doxygen project demonstrating the bug

Dimitri,

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...
Comment 3 Bernd Giesen 2011-01-07 08:06:22 UTC
If I set the GENERATE_TREEVIEW tag to "NO", the error does NOT occur!
Comment 4 Dimitri van Heesch 2011-01-09 09:10:15 UTC
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.
Comment 5 Stefan 2011-01-22 11:06:07 UTC
Dimitri,

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:

      $(node.getChildrenUL()).show();

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.

---
Stefan
Comment 6 Dimitri van Heesch 2011-01-22 11:56:57 UTC
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 http://jquery.com/)
Comment 7 Stefan 2011-01-22 12:13:11 UTC
Dimitri,

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,
Stefan
Comment 8 Dimitri van Heesch 2011-03-28 14:18:44 UTC
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.