diff --git a/src/Umbraco.Infrastructure/Models/RichTextEditorValue.cs b/src/Umbraco.Infrastructure/Models/RichTextEditorValue.cs index 9904ea33bb..cf64747ec2 100644 --- a/src/Umbraco.Infrastructure/Models/RichTextEditorValue.cs +++ b/src/Umbraco.Infrastructure/Models/RichTextEditorValue.cs @@ -10,5 +10,5 @@ public class RichTextEditorValue public required string Markup { get; set; } [DataMember(Name = "blocks")] - public required RichTextBlockValue? Blocks { get; set; } + public RichTextBlockValue? Blocks { get; set; } } diff --git a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/RichTextPropertyEditorHelperTests.cs b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/RichTextPropertyEditorHelperTests.cs index 8d2d59337f..ab68db550f 100644 --- a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/RichTextPropertyEditorHelperTests.cs +++ b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/RichTextPropertyEditorHelperTests.cs @@ -94,6 +94,22 @@ public class RichTextPropertyEditorHelperTests }); } + [Test] + public void Can_Parse_JObject_With_Missing_Blocks() + { + var input = JsonNode.Parse("""" + { + "markup": "