I’ve been trying to upgrade a database from 13 to 16 but I keep on getting the error :
System.Text.Json.JsonException: JSON deserialization for type 'Umbraco.Cms.Core.RichTextEditorValue' was missing required properties including: 'markup'. at System.Text.Json.ThrowHelper.ThrowJsonException_JsonRequiredPropertyMissing(JsonTypeInfo parent, BitArray requiredPropertiesSet) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue) at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo) at Umbraco.Cms.Infrastructure.Serialization.SystemTextJsonSerializerBase.Deserialize[T](String input) at Umbraco.Cms.Core.PropertyEditors.RichTextPropertyEditorHelper.TryParseRichTextEditorValue(Object value, IJsonSerializer jsonSerializer, ILogger logger, RichTextEditorValue& richTextEditorValue)
I spotted there was a fix for something similar in 15 but not an exact match. I’ve tried using uSync Content to export and then import the content but unfortunetly I still get the same errors.
The only thing that does seem to fix it is if I open the site in U13 and then click Save and Publish before then doing the upgrade. However, there are 1000s of nodes in this site and going through each one and clicking Save/Publish is a nightmare of a thought. I had tried to do this via code using the ContentService and also tried Publishing with Descendants but there is clearly something different between doing it that way and clicking the green Save/Publish button.
Running out of idea on how to fix this in a way that is efficient and works.
I’ve also tried upgrading from U13 to U17 in the hope that some migrations have been updated or it wouldnt need the missing markup attribute but it still fails with the same errors.
Looking at the model in Core, I wonder if the fact that the DataMember Name is markdown but the RTEBlock saves as Markdown could cause a mismatch? Grasping here mind you.
Quick guess, you have a Globa lJson setting somewhere in the site that is forcing the naming of objects to Default (Its a newtonsoft thing) - most of the umbraco code guards against this with inline attribute stuff, but maybe not here.
so Everyting in the db (and then in the uSync files also) is writing out property names upper case “see Markup vs markup)
– still guessing
this is then failing when the objects are being read out of the new site because it’s looking `markup` not `Markup`
a quick fix might be a search and replace in the files, but i suspect that won’t work as there will be other bits that also have case issues.;
If you don’t care about the target (e.g you can throw it away when it doesn’t work!) .
then if thats the code, i would try mass renaming “Markup” to “markup” (with the quotes) and “Block” to “block” (again with quotes). in the uSync files in the content section.
That got the content in! Amazing.
I think then once we get the site running we can slowly get the data to convert back to the correct casing one save/publish of new items. At least this way we have the content back in the site.
Thanks for the pointers Kevin, I owe you a drink the next time I see you
Edit: Actually, now that this has been fixed, it’s now just a case of fixing the notification handler to make sure it doesn’t change the casing back.
Anyway, thanks @KevinJump appreciate the help, especially since this wasn’t a uSync issue and more an us issue