Figure Cross Reference Sometimes Display As ID

Post here questions and problems related to editing and publishing DITA content.
verostarry
Posts: 17
Joined: Wed Jul 21, 2021 9:39 pm

Figure Cross Reference Sometimes Display As ID

Post by verostarry »

This happens with webhelp responsive output (no issues in the PDF), and only for rare topics in the latest version of Editor. We can't figure out what's different about those topics or images that isn't happening to the rest.
When cross-referencing figures in webhelp, we'd like them to say "Refer to <figure title>". This is accomplished for almost every link with the args.figurelink.style parameter. The few times the xrefs won't work, they look like this: Refer to 24-30-04.html#ATA-24-30-04-001__fig_kx3_kkm_qrb. While those file names and IDs look like links, they don't go anywhere. The figures they refer to appear fine in webhelp, it's just the xrefs to them that don't work.
Here's a full tag as an example of one that displays as its href (but I don't see the difference between it and a working one):
<step>
<cmd>Find and select the <uicontrol>BMS Parameters</uicontrol>. Refer to
<xref href="#ATA-24-30-04-001/fig_i3g_1wg_q5b"/>. </cmd>
<info>
<fig id="fig_i3g_1wg_q5b">
<title>Menu Structure</title>
<image placement="break"
href="../../../images/24/MenuStructure.png" scale="50"
id="image_j3g_1wg_q5b"/>
</fig>
</info>
</step>
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Figure Cross Reference Sometimes Display As ID

Post by chrispitude »

Hi verostarry,

The link text probably means that the DITA-OT was unable to resolve the link.

Is the figure still contained in a topic element that has the ID value "ATA-24-30-04-001"?

One technique I find useful is to use Oxygen to recreate the link, then compare this new (hopefully working!) link against the broken link and see what is different. For example,
  1. Select the figure element, right-click, and choose Copy.
  2. Place the cursor next to the broken <xref> element.
  3. Right-click, then choose Paste special > Paste as link.
If we are lucky, the new link will publish correctly and thus reveal some difference between itself and the broken link.
verostarry
Posts: 17
Joined: Wed Jul 21, 2021 9:39 pm

Re: Figure Cross Reference Sometimes Display As ID

Post by verostarry »

Hi,
Thanks for proposing a solution! It did not work. I don't believe the figure links are broken as they appear and work fine in PDF output, and this issue is limited to webhelp responsive. Even within webhelp responsive, the figures themselves show up, sometimes right under the links to them that don't work. The IDs to them in links seem to match the figure IDs in Oxygen as well.
Next steps - I'm going to prepare a sample file and send to Oxygen for troubleshooting.
Thanks again!
verostarry
Posts: 17
Joined: Wed Jul 21, 2021 9:39 pm

Re: Figure Cross Reference Sometimes Display As ID

Post by verostarry »

Returning with the solution - we had duplicate topics IDs that were confusing the links. Running Validate and Check for Completeness on the DITA map and making them unique solved this issue.
Post Reply