Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Bug #15517 Wrong table of contents in tutorials
Submitted: 2009-01-05 15:51 UTC
From: darizotas Assigned: ashnazg
Status: Closed Package: PhpDocumentor (version 1.4.2)
PHP Version: 5.2.6 OS: Windows XP SP3
Roadmaps: 1.4.3    

 [2009-01-05 15:51 UTC] darizotas (Dario Borreguero)
Description: ------------ Whenever I write a tutorial that contains the following structure: <?xml version="1.0" encoding="iso-"?> <refentry id="{@id}"> <refnamediv> <refname>Example</refname> <refpurpose> Demonstrate it generates the wrong index </refpurpose> </refnamediv> <refsynopsisdiv> <author> Darío Borreguero <authorblurb> {@link} </authorblurb> </author> </refsynopsisdiv> {@toc} <refsect1 id="{@id sec1}"> <title>Section 1</title> <para> introductory paragragh. </para> <refsect2 id="{@id sec1_1}"> <title>Section 1.1</title> <refsect3 id="{@id sec1_1_1}"> <title>Section 1.1.1</title> <para> Description </para> </refsect3> </refsect2> </refsect1> <refsect1 id="{@id sec2}"> <title>Section 2</title> <para> introductory paragragh. </para> <refsect2 id="{@id sec2_1}"> <title>Section 2.1</title> <refsect3 id="{@id sec2_1_1}"> <title>Section 2.1.1</title> <para> Description </para> </refsect3> </refsect2> </refsect1> </refentry> The table of contents generated is wrong, it nests the second section (sec2) as a "refsect2", that is, an inner section to the first section (sec1). When the expected result should be a table of contents with two sections, instead of one section.


 [2009-07-21 21:37 UTC] ashnazg (Chuck Burgess)
-Roadmap Versions: +Roadmap Versions: 1.4.3
 [2009-08-08 12:29 UTC] ashnazg (Chuck Burgess)
-Status: Open +Status: Feedback -Assigned To: +Assigned To: ashnazg
Tested this using phpDoc v1.4.2 against Ubuntu's PHP v5.2.6, as well as phpDoc's current SVN on multiple PHP versions (5.3.0, 5.2.10, 5.1.6, 5.0.5, 4.4.9) on Ubuntu 9.04. Using the HTML:Smarty:HandS output converter, the sample tutorial file given results in properly nested sections for me: - Section 1 --- Section 1.1 ------ Section 1.1.1 - Section 2 --- Section 2.1 ------ Section 2.1.1 Dario, which output converter did you use that resulted in the incorrect nesting?
 [2009-08-08 19:46 UTC] darizotas (Dario Borreguero)
Hi Chuck, I'm using HTML:frames:DOM/earthli.
 [2009-08-08 23:39 UTC] ashnazg (Chuck Burgess)
-Status: Feedback +Status: Verified
Thanks, Dario... exactly what I needed. Verified the nesting bug using the HTML:frames:DOM/earthli output converter, in all my testbeds. Need to see if any other converters exhibit this behavior.
 [2009-08-09 00:12 UTC] ashnazg (Chuck Burgess)
Running against Ubuntu's PHP 5.2.6, confirmed that this bug behavior exists in all HTML:frames:* and HTML:frames:DOM/* converters, except for HTML:frames:phpedit. This observation, along with the fact that there is no HTML:frames:DOM/phpedit, implies to me that the phpedit converter does not share the same parent code that all the other HTML:frames converters do. More importantly though, it implies to me that the bug may be in the common parent code. I do not see the bug in any HTML:Smarty:* converter, the PDF converter, or the XML:Docbook converter. I can't tell about the CHM converter, but will work on assumption that it's ok too, for now.
 [2009-08-10 07:04 UTC] ashnazg (Chuck Burgess)
Turned out to be identical tutorial_toc.tpl template files in all those output converters... all had a missing unordered list closing tag.
 [2009-08-10 07:13 UTC] ashnazg (Chuck Burgess)
Patched TPL files test good for all HTML:frames:* and HTML:frames:DOM/* output converters on all my testbed PHP versions (5.3.0, 5.2.10, 5.2.6, 5.1.6, 5.0.5, 4.4.9).
 [2009-08-10 07:16 UTC] ashnazg (Chuck Burgess)
-Status: Verified +Status: Closed
Committed to SVN.