# QHP toc broken if mainpage with PROJECT_NAME title has sections/subpages (Origin: bugzilla #735145) #5554

Closed
opened this Issue Jul 2, 2018 · 0 comments

Projects
None yet
1 participant
Owner

### doxygen commented Jul 2, 2018

 status RESOLVED severity normal in component general for --- Reported in version 1.8.7-GIT on platform Other Assigned to: Dimitri van Heesch Original attachment names and IDs: doxygen-brokenqhp-mintest.tar.gz (ID 284066) On 2014-08-21 09:18:22 +0000, Haffmans wrote: Created attachment 284066 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 "" closing tags is placed in the file, making it corrupt. 
 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: 
 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: Create a project with a markdown file as main page, set GENERATE_QHP = Yes, PROJECT_NAME to "My Project". Make the first header the same as the PROJECT_NAME setting, add anchor definition {#mainpage} (i.e. "# My Project {#mainpage}" Add a section to the main page (e.g. "# Introduction {#intro}") or use the "\subpage" command on the main page. Generate the documentation Attached is a minimal example to demonstrate the issue. On 2014-08-24 18:32:16 +0000, Dimitri van Heesch wrote: Confirmed. Should be fixed in the next GIT update. On 2014-12-25 16:03:18 +0000, Dimitri van Heesch wrote: 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).