Can you please provide a sample project where clicking from TOC, the related topic click does not work. This will help me in finding the main problem.
Thank you for your response. Unfortunately, I'm going to have to get back to you on that tomorrow. Here's what happened: I made a copy of one of my projects where this problem occurs, and deleted 99% of the topics, just keeping those that are involved in the problem.
Then I created a new TOC.
Then I ran your original script on that small project (including compilation) -- and now the links work.
So I went back to the original project and ran your script again, thinking maybe I just made a big mistake. No luck.
So tomorrow I will look for differences in the supposedly identical topics in the two projects that might explain why the small project is working but the large one is not. I'll let you know what I find. (However, feel free to comment if you have an idea what I should look for.)
Thanks and regards,
After a lot of detective work, I discovered that it was the process of creating a new TOC that fixed the problem in the new mini-project. Therefore, it seems there was no problem with the script, and I apologize for making that assumption.
I'm still trying to fix the problem without having to re-create the TOC manually, which would take many hours. It is a specialized TOC containing about 1500 entries, and there is no way to do it automatically. And I have the same type & size of TOC in the other project where the related-topic links aren't working.)
I used Notepad and then Beyond Compare to compare the old TOC to the one I auto-created (from which the related-topic links work when I access the topics), and I can't see any difference other than the actual ordering of the books & topics. The beginning and ending tags are the same, and both files contain the same number of start tags as ending tags. I really don't know what else to check, but it seems obvious that there is some kind of problem in the old TOC that is affecting how those related-topic links work. (Isn't that a strange way for a TOC problem to manifest itself?)
I did ZIP up my project and upload it for Praful. There was no result from that -- which perhaps is understandable, because after many more hours of testing, head scratching, and gnashing of teeth, I finally discovered the "cause" of the non-working "Related Topics" links, namely listing a topic multiple times in the same TOC.
The first time a topic is listed in the TOC: If you access the topic that way and click the "Related Topics" link, it works.
Subsequent listings for that topic: If you access the topic from those other locations, and click the "Related Topics" link, it does not work.
I'm not the only one listing topics multiple times in the same TOC. In the particular case, the help describes an API. Each API object has its own folder, where the user can find properties, methods, and examples. Since some properties are used for multiple objects, those properties are listed in the folder describing each object to which they apply. It's in those topics that the "Related Topics" links are broken.
Now that I've found the prerequisites of reproducing this problem (which isn't to say I understand what's going on behind the scenes when the CHM is running), the questions are:
Is this a problem caused by RoboHelp, or by how the CHM file is run by Windows? (I am still running Windows XP, but my colleague who has Windows 7 confirms that it is still a problem when he runs the CHM file on his PC.)
Is there a workaround, or we going to have to restructure our TOCs to compensate for this ridiculous malfunction?
Sorry for the late reply, I verified your assumption, in case there are more than one entry to a topic in TOC, then this issue seems to appear.
Can you please verify one more thing, right click on the microsoft HTML help output SSL layout and select properties, in SSL dialog select breadcrumb option in the dialog. You can change the style and format of the breadcrumb. Now save the settings. Run the related topic script to generate the CHM output.
Let me know if this solves the problem you are facing? I tried the same on the project you shared with me, and could not find the issue.
Thanks for the help and support
Thank you for the suggestion, Praful. I tested your suggestion. Here's the result:
- When I navigate to "Name property" in a book where it first occurs, the "Related Topics" link (actually "Applies To" in this case) works.
- When I navigate to "Name property" in another book where it occurs, and click on that topic, the topic TOC sometimes automatically switches back to the "Name property" in the first book where it occurs. When this happens, the "Applies To" link works.
- When the TOC does not automatically switch back to the "Name property" topic where it first occurs, but stays in the folder where I clicked on the topic, the "Applies To" link does not work.
What do you think?
Obviously I'm not Praful.
However, hopefully y'all won't mind my offering a suggestion here. Having multiple TOC pages that all point to the same topic has long been a trouble spot with help files. This is especially true if your TOC and Topics have been configured to synchronize the TOC and the displayed topic. Which TOC node should be considered the proper node to sync to?
One way past this is to use Redirect pages that point at the topic. You then never actually link directly to the topic from the TOC. Instead, you have as many redirect pages as you have TOC entry points. Then place each redirect page in the TOC where you want it to appear.
Another approach would be to create different HTML pages in RoboHelp, then create a topic and make the complete topic a Snippet. Insert the Snippet on the different topic pages where you would remove all other content save the Snippet. Or if you had RoboHelp 8, you could accomplish this easily using an Inline Frame in the different topic pages. (This has always been possible in all versions of RoboHelp, it's just easier to accomplish in version 8)
Helpful and Handy Links
Thank you for your suggestions, Rick.
However, yesterday I actually got a fix from Praful! It is a new DLL to replace HtmSingleSourceHtmlHelp.dll in the RH installation. I tested it today and have found no problems with it. After discussion at Adobe, he will update this thread so that others can benefit from the fix.