Inaccessible chapters and snippets are also included in the search

Discussions about Help+Manual 9

Moderators: Alexander Halser, Tim Green

Post Reply
Martin Jonas
Posts: 11
Joined: Thu May 30, 2019 11:43 am

Inaccessible chapters and snippets are also included in the search

Unread post by Martin Jonas »

Hello,
in the latest version of the app, snippets are included in the search after publishing to the Webhelp, and the links to the standard chapters don't match. All chapters found in the search results link to the XPLAIN folder with are thus inaccessible. With version 9.3.0 this does not happen.
2024-01-26_074301.png
Martin
You do not have the required permissions to view the files attached to this post.
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Inaccessible chapters and snippets are also included in the search

Unread post by Tim Green »

Hi Martin,

It will just be a coincidence that this is happening with your new update. It has nothing to do with any change in Help+Manual. There are several possible reasons for this, which may also be combined.

First, the special case of your snippet files, which is also covered in 2) below: You must set the include options of snippet files to NONE in the Project Files > Topic Files section. If they are not explicitly excluded like this they will be exported in HTML as topics without TOC entries, since all topics are by default included in all builds. Remember, the TOC is just a list of links. It is the build options on the topic files that control whether they are exported or not. And since snippet files don't have TOC entries, you must set their build options directly on the files. (When you set build options on a TOC entry it normally also sets the same option for the file that it points to.)

1) Only chapters excluded

First of all, if you just exclude a chapter without also specifically excluding all the topics of that chapter as well, then the topics will not appear in the TOC (they have nowhere to go), but the topic files will still be exported in HTML-based output formats. This can be desirable in some cases, when you don't want all possible topics to be in the TOC, but you do want to be able to display them with hyperlinks. (In PDF and Word this is not possible, because those are single documents. Then excluding a chapter really does exclude all the topics.) If you really wish to exclude all the topics in all output formats you need to apply the include options to every topic you want to exclude. You can apply them to multiple topics by selecting them first with SHIFT+Click (blocks of topics) and CTRL+Click (single topics).

2) TOC entry excluded but topic file not excluded

In some cases it is possible for the TOC entry to be excluded without excluding the topic file. This is possible because these are two separate things, and it can also sometimes be desirable to do this. Each has their own separate include option. Normally, excluding a topic in the TOC will automatically exclude the referenced topic file as well (the TOC is just an ordered list of links). If this doesn't happen for some reason, the topic file will be included and can be found with search and the keyword index.

To check this, locate the topic file in Project Files > Topic Files, check its build option setting in the right-click context menu, and apply the appropriate build option if necessary.

3) Topics included because of hyperlinks

Check the compiler report. Are you seeing any messages referencing those topics, saying that they were included because they were referenced in other topics? Also check your settings for the handling of dead links in View > Program Options > Compilers. That is what will pull topics like that in if there are links to them. You can solve the problem quickly by simply setting this to disable the links instead of exporting the topics in the background. However, it is better to apply the same output conditions to the links to excluded topics so that you have alternative text for them instead of just disabling them. How to do this is explained here in the Help+Manual documentation:

https://www.helpandmanual.com/help/hm_a ... links.html

4) Old topics in the output folder

The other possibility is that you are not publishing to an empty folder or not using the option to delete all the files in the output folder before publishing. Then any old topic files from previous compiles will still be there and will be included in the search index, because the index is generated from the files in the output folder. Similarly, you should regularly flush your web server folder, otherwise old files will continue to be indexed by Google and other search engines.

When uploading to your web server the best way to achieve a quick turnaround and a clean upload is to make a new folder on the same level as your production folder. Upload to the new temporary folder and test there. Once you are sure that everything is OK, quickly change the name of the old production folder (for example by adding BAK or OLD to the name or something like that) and rename your temporary folder to the actual production folder name. Then your help will only ever be offline for a few seconds.

5) Old topics in CHM because temporary topics were not deleted

Similarly, when you are generating CHM files you should normally leave the Publish dialog option to delete temporary files on. Only turn it off for analysis purposes when you want to examine the CHM source files generated for some special reason. After turning it on again you need to publish twice to flush the temporary output files as they are deleted after publishing, not before.
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.
Martin Jonas
Posts: 11
Joined: Thu May 30, 2019 11:43 am

Re: Inaccessible chapters and snippets are also included in the search

Unread post by Martin Jonas »

Hi Tim,
thank you for the comprehensive answer. Unfortunately, neither option is my case.

All chapters and sub-chapters are marked correctly for publication. I have no chapters marked as NONE for publishing. I always delete the entire contents of the folder when publishing.

Again, I will remind you of the important points:
  • With version 9.3.0 of the application, the mentioned behavior does not occur. Everything is published correctly and when searching all chapters and snippets are fine. Tried several times by installing the previous version.
  • Why do the search links of some topics direct me to the "XPLAIN" folder (see my screen in the first post)?

Couldn't the problem be caused by the XPLAIN application that I have integrated into HM?
2024-01-29_091912.png
Martin
You do not have the required permissions to view the files attached to this post.
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Inaccessible chapters and snippets are also included in the search

Unread post by Tim Green »

Hi Martin,

There is definitely something wrong here. Please mail me a demo project to support AT ec-software.com (replace the AT with @) with some sample topics that reproduce the issue. You can create this project as follows:

​1: Select Save As.. in the File menu and save the project in the single-file HMXZ format (first option, single file storage).
2: Delete any topics not needed for the demo.
3: Go to Configuration > Common Properties > Miscellaneous. Turn off "Automatically create history files" and delete the history in the project with the "Purge xx history files" button. Then save again.
​4: Perform a test to make sure you can still reproduce the issue with the demo project.​
​5​: Send us the resulting .hmxz file and the .hmskin file you are using for publishing.

Please also include a clear description of how to reproduce the error with the project in the accompanying email.
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.
Martin Jonas
Posts: 11
Joined: Thu May 30, 2019 11:43 am

Re: Inaccessible chapters and snippets are also included in the search

Unread post by Martin Jonas »

Hi Tim,
after a long time, I finally got around to trying out the behavior with the current version of the app. I don't know what has changed, but publishing and searching is now fine.

Thanks for the support anyway,
Martin
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Inaccessible chapters and snippets are also included in the search

Unread post by Tim Green »

Hi Martin,

My guess is that those chapters and snippets either weren't excluded from publishing or were left over and not deleted from an earlier publish operation. Since the search index is generated from whatever files are in the output folder, they would also be included in it if they were present, and they would also get uploaded as well.
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.
Post Reply