Our websites built using Umbraco has crashed twice in last one month with following error message:
Cannot bind source content type Unbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent to model content type Umbraco.Web.PublishedContentModels.HomePage. The view model is ModelsBuilder type, but the source is not. The application is in an unstable state and should be restarted.
Stopping the website and restarting it solves the issue. But I want to find out the root cause so that I can fix the issue permanently.
Will appreciate support from community members. Thanks in advance!
This is a models builder issue. Generally when you see this you have just augmented the doc type and the model is in the process of being regenerated and should fix itself after a minute or two. That said, are you using the models builder? If you are just coding out of the umbraco editor, generally you don’t need that and can turn it off. If you are using visual studio to code and use the models then there are a few different generation modes that you can play with. If you don’t want the models builder there is a config setting to disable and the you would then need to remove the reference to the auto generated models at the top of the page ie remove the HomePage reference from the UmbracoTemplatePage statement. You can read about models builder here: https://our.umbraco.com/documentation/reference/templating/modelsbuilder/Introduction
Umbraco website outage with error - Cannot bind source content type...
Our websites built using Umbraco has crashed twice in last one month with following error message:
Cannot bind source content type Unbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent to model content type Umbraco.Web.PublishedContentModels.HomePage. The view model is ModelsBuilder type, but the source is not. The application is in an unstable state and should be restarted.
Stopping the website and restarting it solves the issue. But I want to find out the root cause so that I can fix the issue permanently.
Will appreciate support from community members. Thanks in advance!
This is a models builder issue. Generally when you see this you have just augmented the doc type and the model is in the process of being regenerated and should fix itself after a minute or two. That said, are you using the models builder? If you are just coding out of the umbraco editor, generally you don’t need that and can turn it off. If you are using visual studio to code and use the models then there are a few different generation modes that you can play with. If you don’t want the models builder there is a config setting to disable and the you would then need to remove the reference to the auto generated models at the top of the page ie remove the HomePage reference from the UmbracoTemplatePage statement. You can read about models builder here: https://our.umbraco.com/documentation/reference/templating/modelsbuilder/Introduction
is working on a reply...