Skip to content

"currentValue" is not current in Umbraco.BlockList element properties #18872

Open
@PeterKvayt

Description

@PeterKvayt

Which Umbraco version are you using?

15.3.0

Bug summary

I encountered the following issue:

I created a document type called "Root Container," which includes a property named "Block List Property" with the data type "Umbraco.BlockList." This data type contains an element-type document called "Element," which has a property named "Text."

Next, I created a node of type "Root Container" and added a new element node to the "Block List Property." I then set the "Text" property within the element node to "Some text."

To investigate further, I placed a breakpoint at the beginning of the FromEditor method in Umbraco.Cms.Core.PropertyEditors.DataValueEditor and observed how currentValue changed. However, I found that currentValue always remained the same as editorValue.Value.

Interestingly, when the property editor is used outside of a Block List, it functions correctly. While this discrepancy is not a major issue for textboxes (as they do not depend on currentValue), it can affect other property editors that do.

This behavior is caused by code (Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase):

Image

Here, as you can see, we set the same value as current.

The behavior should remain consistent regardless of whether the property is inside a "Umbraco.BlockList" element or not.

Specifics

No response

Steps to reproduce

Watch the video

2025-03-30.20-53-35.mp4

Expected result / actual result

Actual: currentValue contains editorValue.Value when it is in element.
Expected: currentValue should contain the actual current value.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions