Try our conversational search powered by Generative AI!

Type 'Customer.Models.Blocks.FlashSizeOptions' could not be mapped to a PropertyDefinitionType


Hi all,

In a block i have defined a property like this:

[Display(Order = 120, GroupName = TabNames.Information)]
[EditorDescriptor(EditorDescriptorType = typeof(EnumEditorDescriptor<FlashSizeOptions>))]
public virtual FlashSizeOptions FlashSize { get; set; }


The FlashSizeOptions enum looks like this:

public enum FlashSizeOptions


and implemented the EnumEditorDescriptor class inhereting from EditorDescriptor

public class EnumEditorDescriptor<TEnum> : EditorDescriptor {...}


What makes this kind of wierd is that this worked for a while, but "just stopped working" It now gives me an exception saying

 Type 'Customer.Models.Blocks.FlashSizeOptions' could not be mapped to a PropertyDefinitionType
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: EPiServer.Core.TypeMismatchException: Type 'Customer.Models.Blocks.FlashSizeOptions' could not be mapped to a PropertyDefinitionType


Have anyone seen this before?

Aug 13, 2013 10:04

The solution was to add a backing type for the property:



Aug 13, 2013 17:42

Thank you for sharing the answer - saved me hours of research :-)

Sep 30, 2013 11:26
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.