Description
A JavaScript exception isĀ logged during export to pdf: document.getElementById(...) is null thrown by:
const numberedHeadingsConfig = JSON.parse(document.getElementById('numbered-headings-config').textContent);
The configuration element is injected using the org.xwiki.platform.template.header.after UIX that is not executed when exporting to PDF because the XWiki header bar (logo, search, user avatar, drawer) is not included in PDF export. The numbered headings application could use instead the org.xwiki.platform.html.head UIX which is executed when exporting to PDF. Now, if the configuration not mandatory then the code should be bulletproofed to prevent such an error.