GNOME Bugzilla – Bug 638829
initNavTree('...',''); call causes script failure in Windows' .chm viewer
Last modified: 2011-03-28 14:18:44 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.
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?
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...
If I set the GENERATE_TREEVIEW tag to "NO", the error does NOT occur!
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.
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
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/)
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
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.