I am trying to build a blog page but I am getting the following error.
An unhandled exception occurred while processing the request.
ModelBindingException: Cannot bind source type Umbraco.Cms.Web.Common.PublishedModels.NewsAndAnnouncementsItemsPage to model type Umbraco.Cms.Web.Common.PublishedModels.IMetaProperties.
Umbraco.Cms.Web.Common.ModelBinders.ContentModelBinder.ThrowModelBindingException(bool sourceContent, bool modelContent, Type sourceType, Type modelType)
Can someone tell me why?
Here is some information about what I did.
I created a Composition called "News and Announcements Properties" that has a property (textString) called News Title
Then I created 2 page types
the first one called "News and Announcements Page" that inherits the "News and Announcements Properties composition"
the second one called "News and Announcements Items Page" that inherits the "News and Announcements Properties composition" and it also has additional properties "News Content" (Textarea) and "News Attachment" (Media Picker)
Then I created a page under content called "News" and then I created 3 children items under it (See attachment for clarification)
Does your site have another composition called .MetaProperties?
The error message is suggesting that your new document type
NewsAndAnnouncementsItemsPage
Doesn't have the properties of this composition and I suspect there is code somewhere in your site that writes out these meta properties on all pages and is throwing the error because your new doc type doesn't have them...?
Yes I have a composition called Meta Properties (metaProperties) and both pages "News and Announcements Page" and "News and Announcements Items Page" inherit meta properties...
Also, both pages use the master template which calls the meta partial.
ModelBindingException: Cannot bind source type
I am trying to build a blog page but I am getting the following error.
An unhandled exception occurred while processing the request.
ModelBindingException: Cannot bind source type Umbraco.Cms.Web.Common.PublishedModels.NewsAndAnnouncementsItemsPage to model type Umbraco.Cms.Web.Common.PublishedModels.IMetaProperties. Umbraco.Cms.Web.Common.ModelBinders.ContentModelBinder.ThrowModelBindingException(bool sourceContent, bool modelContent, Type sourceType, Type modelType)
Can someone tell me why?
Here is some information about what I did.
I created a Composition called "News and Announcements Properties" that has a property (textString) called News Title
Then I created 2 page types
the first one called "News and Announcements Page" that inherits the "News and Announcements Properties composition"
the second one called "News and Announcements Items Page" that inherits the "News and Announcements Properties composition" and it also has additional properties "News Content" (Textarea) and "News Attachment" (Media Picker)
Then I created a page under content called "News" and then I created 3 children items under it (See attachment for clarification)
Hi Yaco
Does your site have another composition called .MetaProperties?
The error message is suggesting that your new document type
NewsAndAnnouncementsItemsPage
Doesn't have the properties of this composition and I suspect there is code somewhere in your site that writes out these meta properties on all pages and is throwing the error because your new doc type doesn't have them...?
Regards
Marc
Hello Mark,
Yes I have a composition called Meta Properties (metaProperties) and both pages "News and Announcements Page" and "News and Announcements Items Page" inherit meta properties...
Also, both pages use the master template which calls the meta partial.
Here is the code from the Master page
and this is the code on the meta data partial
How do I solve this issue?
is working on a reply...