Stream: IG creation
Topic: IG Publisher HTML generation bug?
Max Masnick (Jun 17 2021 at 10:18):
I'm hitting a strange issue where an IG page contents gets "trapped" in a dropdown menu. Here's a live example and a screenshot: image.png
Max Masnick (Jun 17 2021 at 10:19):
This happens reprodubily when I have a broken link in the page that causes a QA error. (It may happen for other reasons too...I don't think there's a broken link in the page above.)
Max Masnick (Jun 17 2021 at 10:21):
Looking at the source for the generated HTML page, I see closing tags missing on lines 181-187: image.png
Max Masnick (Jun 17 2021 at 10:21):
But if I look at fragment-pagebegin.html
in the custom template used for this IG, the closing tags are there: image.png
Max Masnick (Jun 17 2021 at 10:25):
And again, I can usually resolve this by fixing a broken link that appears somewhere on the page. And no matter where the broken link appears on the page, I observe the same behavior.
Max Masnick (Jun 17 2021 at 10:27):
This is reproducible locally for me, as well as on the build.fhir.org CI build. The repo for the IG is https://github.com/dvci/vaccine-credential-ig, and if you check out 864bf3008a714447c18d1d1245d076ba7fa3d840
and build locally you should see the same thing on StructureDefinition-vaccination-credential-immunization-dm-definitions.html
Max Masnick (Jun 17 2021 at 10:30):
Does anyone have a sense of whether this is an IG Publisher bug, or if there's somthing I could be doing within the IG that could cause this behavior?
Grahame Grieve (Jun 17 2021 at 21:29):
I switched to the nominated commit but couldn't reproduce
Max Masnick (Jun 18 2021 at 12:48):
@Grahame Grieve I reproduced again, both locally and on build.fhir.org
$ git clone git@github.com:dvci/vaccine-credential-ig.git vci-test2
Cloning into 'vci-test2'...
remote: Enumerating objects: 2247, done.
remote: Counting objects: 100% (1205/1205), done.
remote: Compressing objects: 100% (458/458), done.
remote: Total 2247 (delta 718), reused 1021 (delta 633), pack-reused 1042
Receiving objects: 100% (2247/2247), 441.68 KiB | 6.05 MiB/s, done.
Resolving deltas: 100% (1439/1439), done.
$ cd vci-test2
$ git checkout 864bf3008a714447c18d1d1245d076ba7fa3d840
$ ./_genonce.sh
Checking internet connection...
Online
FHIR IG Publisher Version 1.1.75 (Git# 3a2ca820510e). Built 2021-06-17T23:27:51.9Z (13 hours old)
Detected Java version: 14.0.2 from /Library/Java/JavaVirtualMachines/jdk-14.0.2.jdk/Contents/Home on Mac OS X/x86_64 (64bit). 12288MB available
...
For build.fhir.org, I created a branch where HEAD is 864bf3008a
: http://build.fhir.org/ig/dvci/vaccine-credential-ig/branches/2021-06-18-bug-reproduction/StructureDefinition-vaccination-credential-immunization-dm-definitions.html image.png
Grahame Grieve (Jun 19 2021 at 20:58):
ok. thanks. I could reproduce that. So I can explain what is happening here.
Grahame Grieve (Jun 19 2021 at 20:59):
the pages contain invalid html. The tags on lines 166 to 171 are not closed
Grahame Grieve (Jun 19 2021 at 21:01):
I use a dom based parser to parse the html, and it's guessing where the tags end, and inserting matching ending tags on line 1705. Any page with a broken link has an anchor tag inserted, and is saved, whereas pages without a broken link are not saved.
Grahame Grieve (Jun 19 2021 at 21:03):
the problem is in your menu.xml, which is not valid xml
Max Masnick (Jun 21 2021 at 00:40):
That fixed it, thanks! I should have caught the missing closing tags in menu.xml -- I didn't inspect that closely because I was so thrown by the closing tags stripped from the template, but garbage in garbage out :grinning:
Last updated: Apr 12 2022 at 19:14 UTC