This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-b9672aa7-aff0-454c-a61e-12c94e9dc8e1 XWIKI-24835 Open

The Live Data displays an endless loading animation instead of an error when no layout can be loaded

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-7bba1cd7-142e-433f-ba09-16da208fba48 Marius Dumitru Florea created this issue on 09/Sep/26 10:39
 
Summary: The Live Data displays an endless loading animation instead of an error when no layout can be loaded
Issue Type: cid:jira-generated-image-avatar-b9672aa7-aff0-454c-a61e-12c94e9dc8e1 Bug
Affects Versions: 17.10.12
Assignee: Unassigned
Components: Live Data
Created: 09/Sep/26 10:39
Priority: cid:jira-generated-image-static-major-345b9c54-f80b-454f-98a5-b898ff3a2e6c Major
Reporter: Marius Dumitru Florea
Description:

The Live Data loads its layout lazily, with a dynamic import. When the requested layout fails to load it falls back on the default layout, but when there is no other layout left to try, because the requested layout is the default one or because no default layout is declared, it silently gives up: the error is only logged in the browser console and the loading animation keeps running. The user is left waiting for a Live Data that is never going to appear.

STEPS TO REPRODUCE

  1. Create a page with the following Live Data macro call. The single declared layout is also the default one, so there is nothing to fall back on.
    {{liveData id="test" source="liveTable" layouts="unknown" /}}
    
  2. View the page.

EXPECTED RESULTS

The Live Data tells the user that it cannot be displayed, replacing the loading animation with an error message.

ACTUAL RESULTS

The loading animation runs forever. The only trace of the failure is an error logged in the browser console:

Unknown layout [unknown]

NOTES

The failure is already detected and reported: since XWIKI-24808 the layoutLoaded event is triggered with the error in its event data when no layout can be loaded at all, so the component that owns the loading animation can react to it. There is a matching TODO in XWikiLivedata.vue.

One constraint on the fix: the loading animation is currently also what tells the functional-test page objects that the Live Data is not usable, since LiveDataElement.waitUntilReady() waits for it to disappear. Whatever replaces it has to keep that distinction, so that the page objects don't start considering a broken Live Data ready.