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

Persistent Live Data breaks Live Data when a column is missing

    XMLWordPrintable

Details

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

    Description

      Steps to reproduce:

      1. Open the wiki index while being logged in as an admin
      2. Enter some filter
      3. Copy the URL
      4. Open the URL in a tab where you're not logged in (e.g., in incognito mode)

      Expected result:

      The Live Data with the wikis is loaded and the filter is restored.

      Actual result:

      The Live Data isn't displaying any columns or data. An error Property descriptor of property `undefined` does not exist is logged in the browser's console.

      The problem here is that the Actions column isn't displayed when the user isn't logged in and this breaks the restoring of the persistent configuration. From what I can see, the decoding of the configuration produces an `undefined` value in the list of properties as the decoding depends on the defined properties. Here a JSON serialization of the decoded configuration, the null is undefined in JavaScript originally:

      {"$_currentLayoutId":"table","$_filters":[{"constraints":[{"operator":"contains","value":"Some"}],"matchAll":false,"property":"doc.creationDate"}],"$_limit":10,"$_offset":0,"$_propertyOrder":[null,"doc.creationDate","wikiprettyname","membershipType","owner","description"],"$_propertyVisibility":[],"$_sort":[{}]}
      

      I'm not sure if ignoring the null value would be enough as to me it also looks like the order of the properties is messed up.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: