Selected value missing after update site 7.5 to 9.12

Vote:
 

We update our customer episerver 7.5 to 9.12. After that, categories property are "empty", selected values ( "Add one or more categories" ) is not show at all, just empty field. And same thing is all dropdowns where values come form categorys. Selected values are okay in currentpage and saving and publish work too..but selected values is missing?

    public class CourtSelectionFactory : ISelectionFactory
    {
        public IEnumerable GetSelections(ExtendedMetadata metadata)
        {
            var list = new List();
            var categoryRepository = EPiServer.ServiceLocation.ServiceLocator.Current.GetInstance();
            var root = categoryRepository.Get(Global.CategorySelectorRoots.ResolutionCategory_Court);
            if (root != null)
            {
                foreach (Category cat in root.Categories)
                {
                    list.Add(new SelectItem
                    {
                        Text = System.Net.WebUtility.HtmlDecode(cat.LocalizedDescription).ToUpper(),
                        Value = cat.ID
                    });
                }
            }
            return list;
        }
    }
    [EditorDescriptorRegistration(TargetType = typeof(string), UIHint = Global.UIHint.Court)]
    public class CourtSelector : EditorDescriptor
    {
        public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable attributes)
        {
            SelectionFactoryType = typeof(CourtSelectionFactory);

            ClientEditingClass = "epi-cms/contentediting/editors/SelectionEditor";

            base.ModifyMetadata(metadata, attributes);
        }
    }


Sorry bad english!

#180292
Jul 05, 2017 12:26
Vote:
 

Anyone ?

#180508
Jul 13, 2017 8:46
Vote:
 

Anyone, this is still problem :(

#181755
Aug 29, 2017 12:23
Vote:
 

At one point in time, I remember that the value of the SelectItem needed to be a string in order for everything to work correctly. I think this was eventually fixed, but it might be after version 9.12. So maybe try changing "Value = cat.ID" to "Value = cat.ID.ToString()".

#181813
Aug 30, 2017 19:30
Vote:
 

Jeah! Thanks Chris! We found that same "tostring" thing just yesterday and now its work great!

Thanks

#181815
Aug 31, 2017 7:12
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.