You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that VersionX is storing the Resource properties data in a strange way. When clicking the "undo" it is modifying the Fred object into a way where Fred can no longer read it.
e.g. Before undo:
"fred":{"data":{"content":[{"widget":"93a11a9c-de0b-42fb-a2ad-9d4ca47f3a1b","values":[],"pluginsData":[],"settings":[],"children":[],"elId":"fred_e6bce7c_6oermhdfaxh"},{"widget":"88fe082e-8270-4a30-9f38-9634ce0cbff9","values":{"test":{"_raw":{"_value":"This is a test<br>"}},"text":{"_raw":{"_value":"<p><a href=\"\/blog\/\" data-fred-link-type=\"page\" data-fred-link-page=\"2\">Test tiny mce test<\/a><\/p>\n<p><img src=\"\/assets\/fred\/modx.png\" alt=\"modx.png\"><\/p>"}}},"pluginsData":[],"settings":{"test":""},"children":[],"elId":"fred_0f00a08_sx8xepm5hgk"}],"fingerprint":"ced09ab03db6eab390a937ddb29703e393c0491c"},"plugins":[]}
After undo:
"fred":{"data":{"content":":{0:{widget:93a11a9c-de0b-42fb-a2ad-9d4ca47f3a1b,values:{},pluginsData:{},settings:{},children:{},elId:fred_e6bce7c_6oermhdfaxh},1:{widget:88fe082e-8270-4a30-9f38-9634ce0cbff9,values:{test:{_raw:{_value:This is a test<br>}},text:{_raw:{_value:<p><a href=\"\/blog\/\" data-fred-link-type=\"page\" data-fred-link-page=\"2\">Test tiny mce test<\/a><\/p>\n<p><img src=\"\/assets\/fred\/modx.png\" alt=\"modx.png\"><\/p>}}},pluginsData:{},settings:{},children:{},elId:fred_0f00a08_sx8xepm5hgk}}","fingerprint":"e6bcb6087c9d9a4f384baee7ed034f2e71c1905c"}
Notice how it converts the "content" to a giant string.
The text was updated successfully, but these errors were encountered:
Thanks @matdave. It looks like something's going awry when the array is being flattened during delta creation.
IIRC that utility was kept from the old version. I wonder if we can't just straight up use json_encode()...
The only downside I can think of off the top of my head is there might be some data in properties that is intended to be kept as json and others that isn't (when decoding). I'll investigate...
It appears that VersionX is storing the Resource properties data in a strange way. When clicking the "undo" it is modifying the Fred object into a way where Fred can no longer read it.
e.g. Before undo:
After undo:
Notice how it converts the "content" to a giant string.
The text was updated successfully, but these errors were encountered: