Console
Console copied to clipboard
Treelist doesn't display a correct data in the tree
Expected Behavior
All allowed items should be displayed as it is in the Content Editor.
Actual Behavior
The dialogue is opened and there are the following items in the tree:
- sitecore -- content -- forms -- Media Library
After refreshing, all items under 'Sitecore' are in the tree: Media Library, content, forms, layout, system, templates.
It also depends on the checkboxes in the View tab of the Content Editor.
Steps to Reproduce the Problem
- Create a dialog as follows: $dialogParams = @{ Title = "Dialog title" Description = "Description under title" OkButtonName = "Execute" CancelButtonName = "Close" ShowHints = $true Parameters = @( @{ Name = "treeListSelector" Title = "Treelist Selector" Editor = "treelist" Source = "DataSource=/sitecore/&DatabaseName=master" Tooltip = "Select one or more from tree" } ) }
$dialogResult = Read-Variable @dialogParams 2. Run the script
Can you share a screenshot what SPE produces and what the standard content editor shows? For example, add a new field to a template with the same values used for the SPE dialog.
https://user-images.githubusercontent.com/36616984/186404919-daeb0a93-4ab4-4acd-850c-8168e960cea0.mp4
Thank you. How about what it looks like directly in the content editor on an item with a treelist field? The point of what I was trying to get at is a comparison between SPE behavior and content editor behavior. If they're the same then the problem is not with SPE.
In the Content Editor I used the same query "DataSource=/sitecore/&DatabaseName=master&excludeitemsfordisplay=Media Library,sitecore,forms,layout,system"
It works fine without any issue as you can see in the screenshot
I do experience the same issue locally. I'll check it out and see what I find.