Uploaded image for project: 'LiveData Exporter Application'
  1. LiveData Exporter Application
  2. LDEXP-10

JavaScript error on pages with a Live Data when the exporter panel is registered

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 1.2
    • 1.1.4
    • None
    • Unknown
    • N/A
    • N/A

    Description

      When the JavaScript of the Live Data Exporter is loaded while a Live Data is being created, the browser console shows:

      An issue occurred while initializing a module depending on the localization query {"prefix":"livedata.exporter." …}
      TypeError: Cannot read properties of undefined (reading 'find')
      

      The code registering the export panel on the existing Live Data instances reads the panels of each instance, but an instance being created already has its data object while its panels aren't initialized yet. The error also stops the registration for the following Live Data instances of the page; the instance being created still gets the panel, through the xwiki:livedata:instanceCreated event.

      It depends on timing, so it doesn't happen on every page load (seen on XWiki 18.4.7 with the Live Data Exporter 1.1.4).

      Attachments

        Activity

          People

            MichaelHamann Michael Hamann
            MichaelHamann Michael Hamann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: