question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Child navigation links to nested topics are incorrect/missing if there is a <ph keyref/>

See original GitHub issue

Actual Behavior

When all of the following are true:

  • A topic file that has nested subtopics in the same file.
  • This topic file is included in two different submaps (content reuse).
  • Both submaps are included (in different keyscopes) in the same top-level map.
  • The topic file contains a <ph keyref="..."/> reference.

then if I run the html5 transformation, the child navigation links for the second submap’s topic instance are missing, which causes all child links to point to the top-level topic instead of the nested topics:

  • Feature Topic
    • Concepts
    • Configuration
      • Option 1
      • Option 2
    • Limitations
  • Feature Topic
    • Feature Topic (incorrect)
    • Feature Topic (incorrect)
      • Feature Topic (incorrect)
      • Feature Topic (incorrect)
    • Feature Topic (incorrect)

If I run the pdf2 transformation instead of the html5 transformation (which uses preprocess2 instead of preprocess), then I get an even weirder result of recursively nested links that are a mix of correct and incorrect links.

Expected Behavior

Child links should resolve correctly, whether there is a <ph keyref="..."/> or not.

If the <ph keyref="..."/> element is deleted, then the child navigation links are gathered correctly:

  • Feature Topic
    • Concepts
    • Configuration
      • Option 1
      • Option 2
    • Limitations
  • Feature Topic
    • Concepts
    • Configuration
      • Option 1
      • Option 2
    • Limitations

Possible Solution

I am not sure yet, but I will follow up if I figure something out.

Steps to Reproduce

  1. Extract the following testcase: incorrect_nested_topic_links.zip
  2. Run the following command in the testcase directory: dita -i map.ditamap -f html5 -o out
  3. View the index.html file in a browser and note the incorrect links.

Environment

  • DITA-OT version: 3.7.0
  • Operating system and version: linux
  • How did you run DITA-OT? dita command
  • Transformation type: html5, pdf2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jlacour31commented, Jun 15, 2022

@jelovirt and @infotexture it seems that the pull request was merged into develop branch and not in hotfixes/3.7.1. So the fix is not available neither in DOT 3.7.1 nor 3.7.2. You should consider cherry picking this fix for a 3.7.3 and updating the release notes to remove the reference to this fix.

0reactions
infotexturecommented, Jun 17, 2022

@jlacour31 Thanks for bringing this to our attention.

I’ve ported the original fix from #3874 to 3.7.3 with #3945 and updated the 3.7.1 Release Notes in the dev docs to remove this issue reference. (The 3.7 docs will be updated when we release 3.7.3.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nested NavigationLinks not working properly in latest SwiftUI
If you navigate to a nested NavLink, then return one level, NavigationLink Views turn gray if touched but do not go to the...
Read more >
Multiple Previous/Next links in wh_navigation_ links
I seem to get multiple navigation links only when topics have nested topic sections and the transformation parameter force-unique is set as ...
Read more >
Swiftui nested navigation issue while using navigation link
When I use a sole standalone navigation link inside tab view screens to direct to another screen programatically, it navigates succesfully ...
Read more >
DITA: Keyref links | I'd Rather Be Writing Blog
You create a key (a word) in your map and define what the key links to. In your topic, you link to the...
Read more >
White page after update - Louislam/Uptime-Kuma - IssueHint
Issue Title Created Date Comment Count Updated... Missing things in the smarthome hub! 39 2020‑06‑11 2022‑07... Chinese Search language problem 3 2022‑06‑14 2022‑10... kernel_build failing when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found