Umbraco.Web.Mvc.ModelBindingException: Cannot bind source content type
I am getting this error and having a hard time fixing it.
Umbraco.Web.Mvc.ModelBindingException: Cannot bind source content type [redacted].Web.ViewModels.PageNotFound to model type [redacted].Web.ViewModels.Subpage.
The error arises when trying to load a 404 error page of document type 'Errorpage'. I am new to Umbraco so I am not entirely sure how to decode the message, but googling suggests that it may be because of this line in /Views/Subpage.cshtml?
I think that is correct yes, although I don't quite know where it states that PageNotFound should use the SubPage template. I have inherited this code base and this is my first exposure to Umbraco :/
Umbraco.Web.Mvc.ModelBindingException: Cannot bind source content type
I am getting this error and having a hard time fixing it.
Umbraco.Web.Mvc.ModelBindingException: Cannot bind source content type [redacted].Web.ViewModels.PageNotFound to model type [redacted].Web.ViewModels.Subpage.
The error arises when trying to load a 404 error page of document type 'Errorpage'. I am new to Umbraco so I am not entirely sure how to decode the message, but googling suggests that it may be because of this line in /Views/Subpage.cshtml?
@inherits Umbraco.Web.Mvc.UmbracoViewPage<[redacted].Web.ViewModels.Subpage> @using ContentModels = Umbraco.Web.PublishedModels
Anyone knows what may be the issue?
Hi
I guess you are trying to reuse the template for SubPage document type on the PageNonFound document type.
Is that correct ?
Dave
I think that is correct yes, although I don't quite know where it states that PageNotFound should use the SubPage template. I have inherited this code base and this is my first exposure to Umbraco :/
is working on a reply...