Merged
Conversation
AndyButland
approved these changes
Feb 17, 2025
Contributor
AndyButland
left a comment
There was a problem hiding this comment.
To test this I've:
- Taken a V13 installation with a rich text field.
- Manipulated the value in
umbracoPropertyDatato remove theblockselement from the stored JSON. - Upgraded to 15 using the current state of
v15/dev - Found the markup removed and the following in the logs:
Could not parse rich text editor value, see exception for details.
System.Text.Json.JsonException: JSON deserialization for type 'Umbraco.Cms.Core.RichTextEditorValue' was missing required properties including: 'blocks'.
- Repeated using the code from this PR and can confirm the markup is displayed in the RTE as expected.
- When the content is saved the database is updated again with the empty
blockselement.
Migaroez
added a commit
that referenced
this pull request
Feb 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
#18275 is caused by
When the migration runs, part of the nested data fails to deserialize and to not make the entire migration fail, a message is logged and the data is cleared.
Since we currently have been unable to figure out how the malformed data has been entered trough the client and we think relaxing the data contract will not have any adverse effects, this pr does just that
Testing
I added a unit test that covers the change. You should be able to update the database manually to contain some problematic data. If not, feel free to reach out to obtain a database.