1 person found this helpful
Personally I'd be more than a bit surprised to discover that the issue is related to RoboHelp. But that doesn't help you solve the issue, does it?
Basically RoboHelp kicks off the Microsoft HTML Help Compiler to create the CHM file(s).
Here is the approach I might take in trying to ascertain what is happening.
Open one of the child CHM files and perform a search for the term. This would be my first "sanity check". I say that because when things aren't going as expected, your mind plays tricks on you. At least mine does. So my first step would be to assure myself that the term actually isn't found when searching the individual files.
Once I did that, I would probably try removing RoboHelp from the picture. You do have Microsoft HTML Help Workshop (HHW) installed, no? If you don't, you really should have it. Anyone developing CHM files should have HHW installed. Just for cases such as this.
If you had to download and install HHW, don't sweat the fact that it reports back that a newer version is already installed or whatever. I think that's the message you see.
Use HHW to open your project and compile your project(s). Particularly the master.
By compiling using HHW, you are removing RoboHelp from the mix entirely. See if the problem persists. (My guess is that the problem will still be present.) But this step will either confirm or deny that RoboHelp has anything to do with what is happening.
Give those things a go and report back what you find.
Helpful and Handy Links
Thanks Rick, that was a very useful pointer. I've tried what you suggested.
I installed HTML Help and have compiled two of my projects in it. The problem does not occur using these two projects so I guess that proves something. HTML Help uses the .HHP file rather than the RH .XPJ file and does not read the .HHC TOC file or the index file (both XML files as you know). Also snippets and variables are ignored during the compilation. It looks like there is a serious bug in RH8 that needs to be sorted out. If it isn't, I won't be able to compile my projects in it.! I think the problem relates in some way to the TOC and/or the index which in RH8.
I dont know. I have proven that when the projects are compiled in HTML Help, the problem I originally described is fixed. However, I can't use HTML Help to compile my projects as it's too old.
1 person found this helpful
Perhaps see if anything in this thread helps.
In particular, incorrect entries appearing in the [MERGE FILES] section of the hhp. If this is the case and you find these entries continue being put into your hhp file, then they are probably also occurring in your xpj file. Theoretically the list here is controlled by your TOC, but I've found it a bit flaky. (Although it is useful for a sub-child merge hack I use. ) Manually removing any incorrect entries should solve this issue.
The other thing I've noticed is if you have the chm files in the project root directory (as RH automatically does when you do the merge links in the TOC) sometimes these get built into the parent, resulting in duplicate entries and out of date content. I delete the files from this location, and just live the with broken baggage files that RH shows. They are not necessary when compiling from HHW, and shouldn't be forced into the parent project by RH.
Thanks Amebr for your reply ...
I have checked the MERGE section of the HHP file and it is OK. I still get multiple results in the search though. I have had problems with the MERGE section in the past though. I have also removed all the chm files in my working folder and recompiled both the master and the child projects. No joy with that either.
A couple of questions ....
I have noticed on one of Rick's threads that hyperlinks to topics outside the project could be a problem. My help files all have hyperlinks that point to target topics in one or more of the other chm files. Is that a problem?
And the other question
Another suggestion was to delete the CPD file. What effect would that have? I assume I would lose something and would have work to do ....
The project's CPD file is rebuilt when you open a project if it isn't present so there is no problem with deleting it. It is a configuration file that is in effect an Access database and can sometimes be the cause of some issues. There is even in option in RH8 to rebuld it each time you open your project.
If that doesn't work, I wonder whether we should be taking another look at the [MERGED FILES] section of your .HHP file. Is there a path to the CHMs there? I ask because I find that when I add an external link to a topic in another CHM that the path to it is added (e.g. C:\Source\ProjectA\projecta.chm). Before compiling each project, open the HHP file and remove the path. This is because your CHMs will have to be installed in the same location and therefore the path is unnecessary.
The RoboColum(n) @robocolumn Colum McAndrew
I delete my CPD on a regular basis (RH6) as this prevents a number of problems when multiple authors have worked on the same project. It can also highlight some inconsistencies that crop up. For example, the other day, one colleague was working happily on a project, but I had to make some changes when he was away. When I opened the project (without a cpd), several files showed up that he couldn't see, but which were being compiled into the output incorrectly. So even when no-one else has worked on my project, I sometimes delete the cpd just to check if I have broken links/extra files I didn't know I had.
Oh, Colum, a reason for the hard-coded path! I'll have to check that out. (While we have the workaround, the reason for it has always bugged me. )
The more I look at this, the more confused I get !
The merge section in the HHP file does indeed have a fully qualified path before the child chm file. As an example, the file Cashbook.chm looks like -
There are 14 of these entries, each pointing to another help file, each with the full path.
Even if I remove the CPD file and remove the paths from the HHP file, the paths 'return' when the master chm file is compiled. I think there may be something in this being the problem but they keep coming back after I remove them!
Another thing - if I copy the master chm file to a new folder (nothing else in it) and I search for a phrase, it 'finds' the phrase in chm files that are not in the folder (say cashbook.chm). These chm files are in the c:\writing\opera III\Help\Main folder (where I build all the child chms and where the master chm is built from). Why does it look in these chm files when they arent in the folder I am working in?. They must be IN the master chm file (they are mentioned as baggage files in the master chm file).
The reappearing path is a known issue with (I believe) the MS HTML Help compiler. It means you have to amend the HHP file each time you want to compile. What I do is have a Notepad file on my desktop with the appropriate [MERGED FILES] section as it should me. That way I can copy / paste which is much quicker.
As for the search, I think this is because the merge merges the keywords into the master project's database. I'd expect you to be unable to access the CHM if you click on a topic in the search results if the CHM is not present. I'm not sure about this though.
The RoboColum(n) @robocolumn Colum McAndrew
I also have a Notepad file on my desktop with the appropriate [MERGED FILES] section as it should be, which I use when I build the project. I wonder though, as the list is changed to include the path every time the project is built, whether it does this BEFORE the compilation (so it will affect the chm file) and AFTER the compilation (so presumably it will have no effect).
Do you have a view on whether hyperlinks to topics in other chm files could be causing the searching problem?