Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-24835

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.12
    • Live Data
    • None
    • Unknown

    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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: