-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialized data (eg. Multi Url picker) in block data gets deserialized #538
Comments
Did some more investigating, and found #400 Tried rolling my own BlockListMapper, where the changes made to mitigate that issue (382e96e) was rolled back (so basically changing BlockListMapper from SyncNestedJsonValueMapperBase to SyncNestedValueMapperBase - and that fixed it! Maybe block based editors are different from Nested Content in that regard? |
This is one of my worlds of pains 😢 - what does and doesn't like the nested JSON serialized into a string or left like an object changes in the wind. There are cases were doing it one way means it works in the front end and not the back office! and its only for certain properties and it depends on what that are in . i think block grid is a little more consistent than NestedContent but we use to have things store differently if they are nested inside something inside the grid, then when they are nested inside something outside the grid, or just in the grid 🤯 ) I will take a deep look, but the amount of times we have swapped out , serialize this as a string with Serialize this and an object on the nested values inside blocks etc, is making my head spin, |
Hi, did a little bit of tweaking, and i think i've found a happy place, where the uSync files are all nice and JSON object'y, but the values that get squeezed back into Umbraco are all escaped and We do have a nightly build for this PR if you want to test : It might be considered a 'format breaking' change this if it changes how the files are actually streamed out of Umbraco (and it might a tiny bit. Its not a big deal but we try not to break the format on patch releases, means this might have to be a minor release thing . |
It fixes my problem 👍 |
Describe the bug
I am currently doing a migration of a v8 site into v12, converting grid to block grid. It's a Cloud site, so I need Deploy to understand the values afterwards.
When having JSON based editors (eg. Multi Url Picker) in your block data, the value gets saved into the usync file serialized (this is also what Umbraco backoffice does in the db). But when importing from a usync file, the serialized data gets deserialized, so the json is saved in the database.
Eg. how it looks in the usync file:
And how it looks in the database (umbracoPropertyData) after importing (I've formatted it in the texteditor, so the json is readable)
It's no problem for Umbraco, for some reason it can handle the value being both a serialized string of JSON, and a real JSON object.
But Umbraco Deploy expects it to be serialized - if not, it just transfers an empty value.
To Reproduce
Expected behavior
The value should be saved as is. When the usync file contains a serialized string, the resulting umbracoPropertyData value should also contain a serialized string.
About your Site (please complete the following information):
Additional context
The site and backoffice works as expected despite the wrongly formatted value. But Umbraco Deploy doesn't.
The text was updated successfully, but these errors were encountered: