diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs index 6befdf86b4..23a5b3f08c 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.PropertyEditors /// /// Provides a default overridable implementation for that does nothing. /// - public class PropertyValueConverterBase : IPropertyValueConverter + public abstract class PropertyValueConverterBase : IPropertyValueConverter { public virtual bool IsConverter(PublishedPropertyType propertyType) { diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs index 857d22288c..999a529c68 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs @@ -161,6 +161,8 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters // fixme MOVE TO MODELS O // merge the crop values - the alias + width + height comes from // configuration, but each crop can store its own coordinates + if (Crops == null) return; + var configuredCrops = configuration?.Crops; if (configuredCrops == null) return; diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs index db272269eb..413e66afb7 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs @@ -10,7 +10,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters /// /// Represents a value converter for the image cropper value editor. /// - [DefaultPropertyValueConverter] + [DefaultPropertyValueConverter(typeof(JsonValueConverter))] public class ImageCropperValueConverter : PropertyValueConverterBase { /// diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs index 4ea73e829e..42c128dca5 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/JsonValueConverter.cs @@ -23,7 +23,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters /// public override bool IsConverter(PublishedPropertyType propertyType) { - var propertyEditor = Current.PropertyEditors[propertyType.EditorAlias]; + var propertyEditor = Current.PropertyEditors[propertyType.EditorAlias]; // fixme inject! if (propertyEditor == null) return false; return propertyEditor.ValueEditor.ValueType.InvariantEquals(ValueTypes.Json); } diff --git a/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs b/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs index e6ea06e752..6cbed8dc6e 100644 --- a/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs +++ b/src/Umbraco.Web/Runtime/WebRuntimeComponent.cs @@ -137,8 +137,7 @@ namespace Umbraco.Web.Runtime composition.Container.GetInstance() .Remove() .Remove() - .Remove() - .Remove(); + .Remove(); // add all known factories, devs can then modify this list on application // startup either by binding to events or in their own global.asax