diff --git a/src/Umbraco.Web/PropertyEditors/DropDownFlexibleConfigurationEditor.cs b/src/Umbraco.Web/PropertyEditors/DropDownFlexibleConfigurationEditor.cs index 5821823576..dbdedebd0a 100644 --- a/src/Umbraco.Web/PropertyEditors/DropDownFlexibleConfigurationEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/DropDownFlexibleConfigurationEditor.cs @@ -27,7 +27,13 @@ namespace Umbraco.Web.PropertyEditors // handle multiple if (editorValues.TryGetValue("multiple", out var multipleObj)) - output.Multiple = multipleObj.TryConvertTo(); + { + var convertBool = multipleObj.TryConvertTo(); + if (convertBool.Success) + { + output.Multiple = convertBool.Result; + } + } // auto-assigning our ids, get next id from existing values var nextId = 1; @@ -56,7 +62,10 @@ namespace Umbraco.Web.PropertyEditors public override Dictionary ToConfigurationEditor(DropDownFlexibleConfiguration configuration) { - var items = configuration?.Items.ToDictionary(x => x.Id.ToString(), x => x.Value) ?? new object(); + // map to what the editor expects + var i = 1; + var items = configuration?.Items.ToDictionary(x => x.Id.ToString(), x => new { value = x.Value, sortOrder = i++ }) ?? new object(); + var multiple = configuration?.Multiple ?? false; return new Dictionary