Skip to content

Observing node name changes not working in v17 backoffice #20759

@sussexrick

Description

@sussexrick

Which Umbraco version are you using?

17.0.0-rc1

Bug summary

In a backoffice block preview using UMB_CONTENT_WORKSPACE_CONTEXT and observing context.name() does not work.

Specifics

I am trying to create a backoffice preview for a block which displays the current content node name.

Using UMB_CONTENT_WORKSPACE_CONTEXT I can use context.getName() to get the name at the time the page is loaded. However, observing context.name() to watch for changes doesn't work. The parameter passed to the callback is always empty, and the backoffice preview only updates after you save, move away from that content item, and then move back to it.

See https://forum.umbraco.com/t/how-do-i-get-the-node-name-from-a-block-editor-view/6522/2 for more context. I could not find any documentation for how to do this, so it could be that the approach suggested in the forum response is wrong.

Steps to reproduce

This is a repro using 17.0.0-rc1 and the default starter kit. I have not created or modified any content, only added the Client folder.

Expected result / actual result

I believe the intended behaviour of the new backoffice is to make updates to things like node name available earlier. I'm not sure whether this is as they're typed, when you tab away from the field, or when you save, but I do not expect to need to move away from the content and back again to see an update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state/needs-more-infoWe don't have enough information to understand and/or give a good replytype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions