This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-57d0ef51-1dff-49ed-bc05-b95c856cc1e4 XWIKI-22491 Open

Persistent Live Data breaks Live Data when a column is missing

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-e408f5f2-6a88-4521-9127-2376f75bb867 Michael Hamann created this issue on 06/Sep/24 10:42
 
Summary: Persistent Live Data breaks Live Data when a column is missing
Issue Type: cid:jira-generated-image-avatar-57d0ef51-1dff-49ed-bc05-b95c856cc1e4 Bug
Affects Versions: 15.10
Assignee: Unassigned
Components: Live Data
Created: 06/Sep/24 10:42
Priority: cid:jira-generated-image-static-major-52d6e73f-f2a7-4951-b1fb-eec955588ead Major
Reporter: Michael Hamann
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.