Console icon indicating copy to clipboard operation
Console copied to clipboard

Treelist doesn't display a correct data in the tree

Open Elena1608 opened this issue 2 years ago • 5 comments

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

  1. 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

Elena1608 avatar Aug 24 '22 09:08 Elena1608

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.

michaellwest avatar Aug 24 '22 09:08 michaellwest

https://user-images.githubusercontent.com/36616984/186404919-daeb0a93-4ab4-4acd-850c-8168e960cea0.mp4

amustafa91 avatar Aug 24 '22 11:08 amustafa91

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.

michaellwest avatar Aug 24 '22 12:08 michaellwest

image

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

amustafa91 avatar Aug 24 '22 12:08 amustafa91

I do experience the same issue locally. I'll check it out and see what I find.

michaellwest avatar Aug 24 '22 14:08 michaellwest