getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.32k stars 168 forks source link

Invalid changed data download. #5791

Closed modufolio closed 1 year ago

modufolio commented 1 year ago

Description

The data that is being downloaded doesn't seem okay, getting [object Object] in a layout field back.

Screenshots
download-changes

layout: 

[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

To reproduce

No idea

Your setup

Kirby Version
3.9.7 4.0.0-beta.1

bastianallgeier commented 1 year ago

Have you tried with beta 2 as well?

distantnative commented 1 year ago

I think this could potentially be a v3 issue even

afbora commented 1 year ago

Yes, the issue already in v3.

afbora commented 1 year ago

We can use JSON.stringify() for array and objects. That would be correct for blocks and layout field but not for structure and object field. It needs to be encoded as yaml data (need a js yaml dependency). I think it seems difficult to detect fields type in local storage.

lukasbestle commented 1 year ago

I'd say pretty-printed JSON would still be better than nothing even for YAML fields. The download is only meant as a backup for manual merging of changes.

afbora commented 1 year ago

Make sense. If everyone agree on using pretty JSON for all non-string data, I can prepare PR for 3.9.8 release.