Page 1 of 1

context-help-map has duplicate entries

Posted: Fri May 19, 2023 11:33 pm
by Micaela Monroe
Hi there,

I have a bookmap with references to three unique topics. One topic is reused. Two topics are pointing to each other in a reltable.

Code: Select all

<bookmap id="bm_Test">
    <booktitle>
        <mainbooktitle>Test</mainbooktitle>
    </booktitle>
    <bookmeta/>
    <chapter href="c_Concept.dita"/>
    <chapter href="tk_Task.dita"/>
    <chapter href="r_Reference.dita"/>
    <chapter href="c_Concept.dita"/>
    <reltable>
        <relheader>
            <relcolspec/>
            <relcolspec/>
        </relheader>
        <relrow>
            <relcell>
                <topicref href="r_Reference.dita"/>
            </relcell>
            <relcell>
                <topicref href="tk_Task.dita"/>
            </relcell>
        </relrow>
    </reltable>
When I generate webhelp and I open the resulting context-help-map.xml file, I see duplicate entries for the reused topic and the topics referenced in the reltable. I would expect one entry per topic. Is this expected behavior? If so, is there a way for me to turn off the duplication?

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<map>
   <appContext helpID="c_Concept" path="c_Concept.html"/>
   <appContext helpID="tk_Task" path="tk_Task.html"/>
   <appContext helpID="r_Reference" path="r_Reference.html"/>
   <appContext helpID="c_Concept" path="c_Concept.html"/>
   <appContext helpID="r_Reference" path="r_Reference.html"/>
   <appContext helpID="tk_Task" path="tk_Task.html"/>
</map>
Thanks!
Micaela

Re: context-help-map has duplicate entries

Posted: Sat May 20, 2023 8:20 pm
by chrispitude
Hi Micaela,

WebHelp publishing does not make any attempt to suppress entries to different files that have the same ID. But interestingly, your multiple entries are pointing to the same files.

I noticed you have this line twice:

Code: Select all

    <chapter href="c_Concept.dita"/>
If you remove the second instance, does the issue get resolved?

- Chris

Re: context-help-map has duplicate entries

Posted: Mon May 22, 2023 5:20 pm
by Micaela Monroe
Hi,

If I remove the second instance of the same topic, or if I remove references to those topics from the reltable, the repetition doesn't happen. Unfortunately, we can't do either in a map with real content.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//Jeppesen//DTD Jeppesen DITA BookMap//EN" "jeppBookmap.dtd">
<bookmap id="bm_Test">
    <booktitle>
        <mainbooktitle>Test</mainbooktitle>
    </booktitle>
    <bookmeta/>
    <chapter href="c_Concept.dita"/>
    <chapter href="tk_Task.dita"/>
    <chapter href="r_Reference.dita"/>
  <!--  <chapter href="c_Concept.dita"/>
    <reltable>
        <relheader>
            <relcolspec/>
            <relcolspec/>
        </relheader>
        <relrow>
            <relcell>
                <topicref href="r_Reference.dita"/>
            </relcell>
            <relcell>
                <topicref href="tk_Task.dita"/>
            </relcell>
        </relrow>
    </reltable>-->
</bookmap>

Code: Select all

<map>
   <appContext helpID="c_Concept" path="c_Concept.html"/>
   <appContext helpID="tk_Task" path="tk_Task.html"/>
   <appContext helpID="r_Reference" path="r_Reference.html"/>
</map>
Thanks,
Micaela

Re: context-help-map has duplicate entries

Posted: Tue May 23, 2023 12:16 pm
by radu_pisoi
Hi,

I think there are two case:
1. Topics that are referenced in the relationship table. For these topics, there should no entry generated in the context-help-map.xml file.
2. Duplicate references of the same topic in map, like c_Concept.dita. For this case, it is recommended to use copy-to attribute to create a duplicate version of the HTML topic. Otherwise,the navigation links will not work as expected.

Code: Select all

<topicref href="c_Concept.dita" copy-to="c_Concept_2.dita">
        <topicmeta>
            <resourceid appid="c_Concept_2"></resourceid>
        </topicmeta>
</topicref>
For the above example, the following entry should be generated in the context-help-map.xml file

Code: Select all

<appContext helpID="c_Concept_2" path="c_Concept_2.html"/>
Unfortunately, this not happen in the current WebHelp version.

I have added an issue in our internal issues tracker for both situations: WH-3167.

Re: context-help-map has duplicate entries

Posted: Tue May 23, 2023 5:35 pm
by Micaela Monroe
Thanks Radu!

Re: context-help-map has duplicate entries

Posted: Fri Dec 05, 2025 7:55 pm
by Andreas70
Hello there,
we are facing an issue with HelpIDs which seems to be related to this topic.
Therefore, I would like to know if problem WH-3167 has already been resolved or if our problem is a new one:

In case a topic is referenced two times within the bookmap, the context help map contains only references to the first topic context.
When providing resource IDs on both topic references, we expected the second reference pointing to voo1761670243355_2.html, but we get this result:

Code: Select all

   <appContext helpID="HelpID_TopicRef_1" path="voo1761670243355.html"/>
   <appContext helpID="HelpID_TopicRef_2" path="voo1761670243355.html"/>
Withtout providing resource IDs, we get just duplicated entries:

Code: Select all

   <appContext helpID="voo1761670243355" path="voo1761670243355.html"/>
   <appContext helpID="voo1761670243355" path="voo1761670243355.html"/>
The result becomes a bit unpredictable, if we have a mixture of topic references with and without resource ID.
If the resource ID is provided only for the first topic reference, there is just one entry:

Code: Select all

   <appContext helpID="HelpID_001" path="voo1761670243355.html"/>
If the resource ID is provided only for the second topic reference, there are 3 entries:

Code: Select all

   <appContext helpID="voo1761670243355" path="voo1761670243355.html"/>
   <appContext helpID="voo1761670243355" path="voo1761670243355.html"/>
   <appContext helpID="HelpID_TopicRef_2" path="voo1761670243355.html"/>
Disabling the fallback to the Topic ID (webhelp.csh.disable.topicID.fallback) does not make any difference, the second resource ID is always pointing to the first topic context.

For us, it is cruical that the topics are opened in the correct context.

Thanks
Andreas

Re: context-help-map has duplicate entries

Posted: Thu Dec 11, 2025 12:08 pm
by julien_lacour
Hello Andreas,

This is still related to WH-3167, and we are working on a solution which involves setting the resource ID for all duplicated topics to prevent duplicate values in the context-help map. As you mentioned this is crucial for you, you could send us an email at support@oxygenxml.com where you can ask for a beta version in order to test this fix.

Regards,
Julien

Re: context-help-map has duplicate entries

Posted: Fri Dec 12, 2025 12:53 pm
by Andreas70
Hello Julien,
the fix for WH-3167 which is contained in the beta version solves the issue.
We are able to integrate this fix into our WebHelp plugin and the target of the second Help ID is now correct.

Thank you very much
Andreas