Details
-
Bug
-
Resolution: Unresolved
-
Major
-
18.7.0
-
None
-
Unknown
-
Description
Create a new page with a Live Data macro call. I used the first example from https://extensions.xwiki.org/xwiki/bin/view/Extension/Live%20Data%20Macro/#HUsage . Export the page to PDF.
{{liveData
id="recentPages"
properties="doc.title,doc.location,doc.author,doc.date"
source="liveTable"
sourceParameters="translationPrefix=platform.index."
sort="doc.date:desc"
limit="5"
/}}
Expected: the live data is rendered in the generated PDF, as it was in view mode
Actual: when performing the export with the user's own browser, the live data is rendered most of the time but once in 5-10 repetitions we see just the spinning wheel. When using the headless Chrome Docker container, the live data is almost never rendered. We just see the loading animation.
This smells very much like a race condition. The print preview page is printed to PDF once it's ready (window is loaded, all resources / images are loaded, initial async requests have complete). We know it's ready based on the PageReady module, which does some automatic checks (e.g. by hacking into XMLHttpRequet and fetch), but not every "page load delay" case can be detected automatically. In some case we need to manually delay the page ready.
My feeling that in this case, for live data, we need to manually delay the page ready until the live data fully loaded and rendered (its data is fetched and displayed).
Attachments
Issue Links
- is related to
-
XWIKI-24796 Live Data fails to render in PDF export on 17.10.x
-
- In Progress
-