Oh, hello dear blog. New day, new bug. This one is of the ‘Shoot myself in the head’ -kind, but just in case you encounter the same, here you go.. Development environment EPiServer 8.
Server Error in ‘/’ Application.
Type ‘Organization.Project.Web.Models.Pages.ContactPage’ 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 ‘Organization.Project.Web.Models.Pages.ContactPage’ could not be mapped to a PropertyDefinitionType
I tried to change, remove,.. the ContactPage page type but nothing helps. After two hours I realize that I have the following typo in another Page Type:
So effectively I had defined the page type Contact Page to be used as a block in another page type (the block is called ContactBlock.) It’s a typo, but not that straight forward to find the root cause for the error message above.