Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Content Picker, gets dynamic root value from menu context #2212

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

leekelleher
Copy link
Member

Description

In the Content Picker, (formerly Multinode Treepicker), to set the start node of the picker (using Dynamic Root), the UMB_ENTITY_WORKSPACE_CONTEXT was used to get the unique ID of the entity. However, when using the Content Picker within a Block Grid/List, the workspace context was for the Block, not the top-most entity, e.g. a document.

Rather than attempt to query the Block's modal context (for the parent entity workspace context), I have opted to use the UmbMenuStructureWorkspaceContext.structure to get the top-most entity workspace's unique and parent unique values.

(We were already using this to get the parent unique)

Fixes umbraco/Umbraco-CMS#16632.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

How to test?

  • Configure a Content Picker property-editor with a "Node type" of "Content" and "Specify root node". (The exact configuration doesn't matter).
  • Add to a property on an element-type, then configure a Block List property-editor to use that element-type.
  • Add both the Content Picker and Block List data-types to a document-type.
  • Create a new document (of that type); try opening the Content Picker modal, do you get the expected results? and no error?

…niques

Uses `UmbMenuStructureWorkspaceContext.structure` to get the
top-most entity workspace's unique and parent unique values.
Copy link

sonarcloud bot commented Aug 19, 2024

@leekelleher leekelleher merged commit 0e8de9a into main Sep 9, 2024
8 checks passed
@leekelleher leekelleher deleted the v14/bugfix/content-picker-dynamic-root-nested branch September 9, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MNTP dynamic root doesn't work inside block list elements
3 participants