How to use EditFrame to edit Multilist field with search

1.1k views Asked by At

I have a slight problem :/ I have an item in sitecore which contains a multi list field with search looking like this:

Multilist field in Sitecore Backend

The field and selected values are mapped via Glass Mapper for Sitecore like this:

public interface ILookItem
{
    ID ID { get; }
    string LookHeadline { get; set; }
    string LookInformation { get; set; }
    Image LookImage { get; set; }
    IEnumerable<IThumbnailImage> Children { get; }
    IEnumerable<ISkuItem> ProductIds { get; set; } 
    IEnumerable<LookProductModel> Products { get; set; } 
}

ProductIds is the corresponding multilist field.

In my cshtml file I have mapped the productIds into an editframe to enable editing from experience editor:

@using (Html.Glass().BeginEditFrame(look, "Edit look", x => x.ProductIds))
{
    <p>@look.LookHeadline</p>
    <img src="@look.LookImage.Src" alt="@look.LookImage.Alt"/>
}

Above should be alright and it also represented correctly in experience editor, except I cannot change the values of the multilist field.

Multilist field in experience editor

Can anyone tell me what I'm doing wrong?

1

There are 1 answers

1
siddhipur On

If anyone is having same problem. Navigate to

\Website\sitecore\shell\Controls\BucketList

Open BucketList.js file

Comment the following line.

self.contentLanguage = $('scLanguage').value;

Add the following line.

self.contentLanguage = $('ContentEditorForm').lang;

This should fix the issue.