Page not included in TOC appears in CHM search index

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Martin Krimmel
Posts: 15
Joined: Wed Dec 11, 2019 3:47 pm
Location: Germany
Contact:

Page not included in TOC appears in CHM search index

Unread post by Martin Krimmel »

Hi y'all,
I am just investigating a phenomenon where a CHM help lists a topic under the "Search" tab which is explicitly excluded from the TOC of the project and does not appear anywhere else in other output formats.
Only the CHM output lists the page in the search index. Is this a known bug that pages are included in the search index of a CHM, even if they not included in the TOC?
How can I avoid that (except by deleting the topics altogether)?
Thanks in advance.
Regards
Martin
Last edited by Martin Krimmel on Tue Nov 24, 2020 9:25 am, edited 1 time in total.
Martin Krimmel
Technical Writer/Translator
d.velop Life Sciences GmbH
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Page not included in TOC appears in CHM search index

Unread post by Tim Green »

Hi Martin,

This isn't a bug. What is happening is that something is forcing the inclusion of that topic without a TOC entry, which is both perfectly possible and sometimes desirable -- for example for topics that you only want to show in response to a hyperlink. Here are the possible causes:

You excluded a chapter topic but not its sub-topics:
If you exclude a chapter topic you will not see its sub-topics in the TOC of the output because they have nowhere to go. But because you have not excluded the individual topics their topic files WILL still be included, and will be found with search and the keyword index. You need to explicitly exclude each topic you wish to exclude in HTML output. (This doesn't apply in PDF and DOCX because there it is the TOC that defines what is in the output since the output is all just one long document -- there cannot be any separate topics in the background to be displayed.)

There is a hyperlink to the excluded topic and your dead links options are forcing it to be included:
You can find hyperlinks to the topic with the Find Referrers function in the right-click context menu. Then look in View > Program Options > Compilers to see how your settings for handling dead links are configured. It is possible to configure them to force the inclusion of the target topics of links to prevent dead links. See this topic in the help for full details on handling links efficiently with conditional output.

The "delete temporary files" option is turned off:
If you turn off the option to delete temporary files for CHM output then the files from the previous publish operation will still be in the temporary files folder the next time you publish. If a topic was included in the last publish but excluded in the current publish it will still be in the output folder, and will get put in the CHM since it is there. Note that when you turn the option off you need to publish twice to clear the temporary folder, as it is deleted after publishing, not before. (You can delete it manually instead: the folder is stored in your project folder and is called ~tmpchm.)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Martin Krimmel
Posts: 15
Joined: Wed Dec 11, 2019 3:47 pm
Location: Germany
Contact:

Re: Page not included in TOC appears in CHM search index

Unread post by Martin Krimmel »

Hi again,

thanks for the reply, Tim.

Now that you explained this as a valid function, the entire thing becomes more clearer, even if none of your suggestions directly matched what must have happened.

I checked your suggested causes but did not find any links or related sub topics. Neither did I change the settings for the temp-files.

Most likely, the topic has previously been excluded from all builds and was then removed from the TOC.

I assume that, as a result of a subversion synch or something like that, the settings for this topic were changed back to "Include in all builds" which wasn't noticed immediately.

So, this "zombie topic" has probably been there for some time and only "unearthed" now as a result of a direct search.

Now that I am aware of these dependencies, I may even be using this feature in the future. ;-)

Thanks again!

Regards
Martin
Martin Krimmel
Technical Writer/Translator
d.velop Life Sciences GmbH
Post Reply