Skip to content

Conversation

@engijlr
Copy link
Contributor

@engijlr engijlr commented Nov 21, 2025

Fixed: #20400

Problem

The umbContentName component in Block List labels always displayed content names in the default language, regardless of the currently active backoffice culture.

Solution

In content-name.element.ts, the code previously always accessed variants[0].name, which returned the first variant (typically the default language) regardless of the current backoffice culture. Now uses UmbDocumentItemDataResolver to get culture-aware content names for documents.

How to test

  1. Create a document with multiple language variants.
  2. Add a Block List with {umbContentName: combiGift} in the label
  3. Switch between languages in the backoffice
  4. Verify the block label updates to show the correct language variant

@leekelleher leekelleher self-requested a review November 24, 2025 15:22
Copy link
Member

@leekelleher leekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested out, working as expected! 🚀

I made a small tweak to set the default entity-type to UMB_DOCUMENT_ENTITY_TYPE instead of null, (this was a bug in my original code). As this is to support the Document Picker property-editor (which doesn't have a type on its value).

@leekelleher leekelleher enabled auto-merge (squash) November 24, 2025 15:51
@leekelleher leekelleher merged commit 3d90fff into main Nov 24, 2025
27 of 28 checks passed
@leekelleher leekelleher deleted the v17/bugfix/ufm-content-name-element-not-showing-correct-backoffice-language branch November 24, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UFM: contentName component does not take current backoffice language into account

3 participants