Skip to content

Conversation

@AndyButland
Copy link
Contributor

Prerequisites

  • I have added steps to test this contribution in the description below

Fixes: #20967

Description

This PR fixes an issue with the following setup:

  • A user with more than one media root node assigned (either directly on the user account, or from being part of two groups that each have a different media root node assigned).
  • Opening a media picker on a document would not present any nodes to pick from

It's reported as a regression but:

  • I couldn't replicate the reported problem with a single media root node
  • Looking at the code history, it seems this has been incorrect for a while in returning an empty collection.

Testing

Follow steps in description above and verify the presentation and selection of items in the media picker.

Copilot AI review requested due to automatic review settings November 28, 2025 11:19
Copilot finished reviewing on behalf of AndyButland November 28, 2025 11:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes issue #20967 where users with multiple media root nodes (assigned either directly or through user group memberships) could not see any nodes in the media picker. Previously, the GetPagedChildren endpoint returned an empty result when queried at root level for users with custom start nodes; it now correctly returns the user's start nodes as entities.

Key Changes

  • Modified the root-level entity retrieval logic to fetch and return actual entities for users with multiple start nodes instead of returning an empty collection
  • Refactored duplicate entity mapping logic into a reusable local function MapEntityBasic, which also fixed a bug where culture was set twice in the mapping context

@AndyButland AndyButland changed the title Media Picker: Presented root nodes for users with more than one media root node assigned (closes #20967) Media Picker: Present root nodes for users with more than one media root node assigned (closes #20967) Nov 28, 2025
AndyButland and others added 2 commits November 28, 2025 14:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@leekelleher leekelleher self-requested a review December 1, 2025 12:19
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, works as described. 🚀

@leekelleher leekelleher merged commit d418f4f into v13/dev Dec 1, 2025
20 checks passed
@leekelleher leekelleher deleted the v13/bugfix/media-picker-with-multiple-root-folders branch December 1, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants