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 735145 - QHP toc broken if mainpage with PROJECT_NAME title has sections/subpages
QHP toc broken if mainpage with PROJECT_NAME title has sections/subpages
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.7-GIT
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2014-08-21 09:18 UTC by Haffmans
Modified: 2014-12-25 16:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
minimal example that generates broken qhp (26.42 KB, application/gzip)
2014-08-21 09:18 UTC, Haffmans
Details

Description Haffmans 2014-08-21 09:18:22 UTC
Created attachment 284066 [details]
minimal example that generates broken qhp

If you have a markdown main page file, with anchor #mainpage, which has the same title as the PROJECT_NAME, using sections or subpages on that main page will break the QHP file - one too many "</section>" closing tags is placed in the file, making it corrupt.

    <toc>
      <section title="My Project" ref="index.html">
        <section title="Table of Contents " ref="index.html#toc" />
        <section title="Sub-page" ref="mysubpage.html">
          <section title="Intro " ref="mysubpage.html#subintro" />
        </section>
      </section>
    </section>
  </toc>

The page itself is collapsed in the QHP toc (there's no duplicate reference to index.html, as discussed in #612854).

After changing the label of the main page to something that doesn't match the PROJECT_NAME setting (e.g. "My Project Mainpage"), the generated QHP file is correct:

    <toc>
      <section title="My Project" ref="index.html">
        <section title="My Project Mainpage" ref="index.html">
          <section title="Table of Contents " ref="index.html#toc" />
          <section title="Sub-page" ref="mysubpage.html">
            <section title="Intro " ref="mysubpage.html#subintro" />
          </section>
        </section>
      </section>
    </toc>

Note how the mainpage reference is now not collapsed into the main index.html reference; instead you have the duplicate reference (again, bug #612854 also mentions this).

If the main page has no sections (e.g. "\ref" instead of "\subpage", no headings with anchor definitions as "{#anchor}"), the output is also correct.

This might also be related to bug #558361.

*Steps to reproduce:*
1. Create a project with a markdown file as main page, set GENERATE_QHP = Yes, PROJECT_NAME to "My Project".
2. Make the first header the same as the PROJECT_NAME setting, add anchor definition {#mainpage} (i.e. "# My Project {#mainpage}"
3. Add a section to the main page (e.g. "# Introduction {#intro}") or use the "\subpage" command on the main page.
4. Generate the documentation

Attached is a minimal example to demonstrate the issue.
Comment 1 Dimitri van Heesch 2014-08-24 18:32:16 UTC
Confirmed. Should be fixed in the next GIT update.
Comment 2 Dimitri van Heesch 2014-12-25 16:03:18 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.9. 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 (preferrably in the form of a self-contained example).