-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Media Picker: Present root nodes for users with more than one media root node assigned (closes #20967) #20993
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
base: v13/dev
Are you sure you want to change the base?
Media Picker: Present root nodes for users with more than one media root node assigned (closes #20967) #20993
Conversation
…ia root node assigned.
There was a problem hiding this 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
| if (id == Constants.System.Root && startNodeIds.Length > 0 && | ||
| startNodeIds.Contains(Constants.System.Root) == false && !ignoreUserStartNodes) | ||
| startNodeIds.Contains(Constants.System.Root) == false && | ||
| ignoreUserStartNodes == false) |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expression 'A == false' can be simplified to '!A'.
| ignoreUserStartNodes == false) | |
| !ignoreUserStartNodes) |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Prerequisites
Fixes: #20967
Description
This PR fixes an issue with the following setup:
It's reported as a regression but:
Testing
Follow steps in description above and verify the presentation and selection of items in the media picker.