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)
Text = System.Net.WebUtility.HtmlDecode(cat.LocalizedDescription).ToUpper(),
Value = cat.ID
[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";
Sorry bad english!
Anyone, this is still problem :(
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()".
Jeah! Thanks Chris! We found that same "tostring" thing just yesterday and now its work great!