Umbraco-CMS: fix: block list very slow to / fails to render labels when using {{ propertyName | ncNodeName}}

Block list very slow to / fails to render labels when using {{ propertyName | ncNodeName}}

Umbraco version

I am seeing this issue on Umbraco version: 8.12.2

Reproduction

Bug summary

When using the block list with a block that contains a multinode tree picker, I want to display the name of the selected node on the block, similar to if I had used the multinode treepicker directly and allowed multiple items. The node name on each block either loads very slowly or does not load at all.

image

Specifics

Google Chrome on Windows - latest

Steps to reproduce

Create a document type with a block list editor property. The block list editor contains one block with a multinode treepicker on the content model with alias = article. The block has the label expression {{ article | ncNodeName }}

Create / publish the above then add multiple items to the block list editor.

Expected result

Labels should reliably and quickly update to show the name of the article selected on the content model.

Actual result

Label fails to load or loads on the order of minutes the name of the article selected on the content model.


This item has been added to our backlog AB#21097

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

As the ncNodeName filter makes a server request to retrieve the name, the value ‘loading…’ is returned. This filter has no mechanism to update the label, which means that though the request is complete slightly after, the UI is still stuck with ‘loading…’ This then works the second time the label is written/updated as the name is cached and therefore it can be returned instantly from the filter.

If this worked well in Nested Content it must be because Nested Content updated the labels offen. This is not the case in Block List Editor as the label only updates when there is a change of some sort, like sorting or Save & Publish.

I’m not sure if a filter can be made so it triggers an update, but this would be needed for such to work well.

A fix has been merged into the v10/dev channel and is being considered for 10.2 or 10.3. Thank you everyone for your feedback with this issue!

This issue is also present in Umbraco v10.0.1.

I’m also seeing this v8.15.0.

I have a Multinode Tree Picker that’s limited to a max of 1 item, the label for the Block List Item is Testimonial Quote | {{testimonial | ncNodeName}}, the label name never seems to load if I just sit and wait for it. image

Interestingly, I’ve noticed a couple of quirks:

  • If I click into a different content node, from the Tree, and then click back into the content node I was originally on, the label loads instantly. image

  • If I add another one to the block list, then the one that’s in a nested list loads instantly, but the “outer” one does not. image

  • The labels load in when I drag/drop to reposition the blocks.

@mrgiao There is a label field on the block editor definition. If you use “{{ propertyName | ncNodeName}}” as the label and replace “propertyName” with the name of the property containing the multinode tree picker it will then work, sometimes.

On topic, I worked around the slowness/reliability issue by making our own ncNodeName and set a config property in EditorModelEvents which is a cache of the names of all the contents, then read this cache first in ncNodeName directive.