You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
15.2.0 RC
Bug summary
When trying to save content, I get the following exception (was fine on 15.1):
System.NullReferenceException: The property BlockEditorValues must be initialized at value editor construction
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase`2.get_BlockEditorValues()
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase`2.MergeVariantInvariantPropertyValue(Object sourceValue, Object targetValue, Boolean canUpdateInvariantData, HashSet`1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.RichTextPropertyEditor.MergeVariantInvariantPropertyValue(Object sourceValue, Object targetValue, Boolean canUpdateInvariantData, HashSet`1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase`2.CleanupVariantValues(List`1 sourceBlockItems, List`1 targetBlockItems, Boolean canUpdateInvariantData, HashSet`1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase`2.MergeVariantInvariantPropertyValue(Object sourceValue, Object targetValue, Boolean canUpdateInvariantData, HashSet`1 allowedCultures)
at Umbraco.Cms.Core.PropertyEditors.BlockListPropertyEditor.MergeVariantInvariantPropertyValue(Object sourceValue, Object targetValue, Boolean canUpdateInvariantData, HashSet`1 allowedCultures)
at Umbraco.Cms.Core.Services.ContentEditingService.EnsureOnlyAllowedFieldsAreUpdated(IContent contentWithPotentialUnallowedChanges, Guid userKey)
at Umbraco.Cms.Core.Services.ContentEditingService.UpdateAsync(Guid key, ContentUpdateModel updateModel, Guid userKey)
at Umbraco.Cms.Api.Management.Controllers.Document.UpdateDocumentController.<>c__DisplayClass4_0.<<Update>b__0>d.MoveNext()
This seems to be happening because the RichTextPropertyValueEditor constructor is not initializing the BlockValues property here:
In my limited testing, this seems to select the right block, though I am unsure if this is always correct
This fix is still not enough, as now the RTE breaks trying to read the blocks JSON. I haven't dug too much into this, but the cause seems to be that it is trying to read the whole JSON value (including the markup property, instead of only reading the blocks property.
In short, v15.2 seems to be pretty badly broken when it comes to the block list editor, particularly involving the RTE. You cannot save any content at all.
Specifics
No response
Steps to reproduce
Create a doc type (language variant) with a block grid/list editor that is invariant. Make sure it has an item with an RTE. Watch things break.
If the property has language variants turned on, nothing happens. So this seems to be related to the new blocks variants feature in v15.
Expected result / actual result
I would expect saving content to work normally, no matter what the configuration is
The text was updated successfully, but these errors were encountered:
Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.
We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
We'll replicate the issue to ensure that the problem is as described.
We'll decide whether the behavior is an issue or if the behavior is intended.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.
Thanks, from your friendly Umbraco GitHub bot 🤖 🙂
arknu
changed the title
[15.2 RC] Unable to save content with a block editor containing an RTE
[15.2 RC] Unable to save content with a block editor containing an RTE when using block-level variations
Jan 30, 2025
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
15.2.0 RC
Bug summary
When trying to save content, I get the following exception (was fine on 15.1):
This seems to be happening because the
RichTextPropertyValueEditor
constructor is not initializing the BlockValues property here:Umbraco-CMS/src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyEditor.cs
Lines 99 to 131 in 55b5d7e
Adding this line fixes this issue:
However, this now exposes further issues. The logic for meging blocks seems to be broken, selecting the first element with just a matching culture:
Umbraco-CMS/src/Umbraco.Infrastructure/PropertyEditors/BlockValuePropertyValueEditorBase.cs
Lines 349 to 350 in 55b5d7e
In my testing, this always just selects the first block, which surely cannot be right. I tried selecting with the alias as well:
In my limited testing, this seems to select the right block, though I am unsure if this is always correct
This fix is still not enough, as now the RTE breaks trying to read the blocks JSON. I haven't dug too much into this, but the cause seems to be that it is trying to read the whole JSON value (including the
markup
property, instead of only reading theblocks
property.In short, v15.2 seems to be pretty badly broken when it comes to the block list editor, particularly involving the RTE. You cannot save any content at all.
Specifics
No response
Steps to reproduce
Create a doc type (language variant) with a block grid/list editor that is invariant. Make sure it has an item with an RTE. Watch things break.
If the property has language variants turned on, nothing happens. So this seems to be related to the new blocks variants feature in v15.
Expected result / actual result
I would expect saving content to work normally, no matter what the configuration is
The text was updated successfully, but these errors were encountered: