Error: ContentTypeService failed to find a content type with alias "ContentPage".
My client is in the process of finalising content for a site I just built, and is getting this error when making some changes. It seems to resolve itself after a while, but when it's showing a full site publish doesn't resolve it.. i'm not sure what does to be honest.
Any pointers as to the cause of this would be great. The site is on Umbraco 7.2.8 using MVC. Error is:
Server Error in '/' Application.
ContentTypeService failed to find a content type with alias "ContentPage".
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: System.Exception: ContentTypeService failed to find a content type with alias "ContentPage".
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Okay so it seems I've resolved this issue. The way I resolved it was to edit some content on the item for which preview was failing. Which is weird because I'd tried multiple times to rebuild the umbraco.config file by deleting it and restarting the app, etc. But only editing a field on that item, then saving would fix it.
Anyway, maybe this will help somebody else one day...
Actual problem is that even after preview was failed, preview cookie still exist, something like UMB_PREVIEW. Remove it, and page will be executed in usual pipeline.
Not to restart an old thread, but your info was a livesaver :)
Your info helped me to fix a similar exception for 7.5.11 on a typed call to FirstChild() on preview of the home page.
What I noticed was that Umbraco tried to search for the template name and not the alias name. Only after republishing the child node that triggered the error, I was able to preview the home node again.
I have seen this issue and similar issues a couple of times.
Can happen when you move code and get and old umbraco.config file in the App_data folder. If you rewiew the contents of that file you might find the aliases searched for, that might not exist anymore... Delete the file and make a republish of all published items normally works for me.
Error: ContentTypeService failed to find a content type with alias "ContentPage".
My client is in the process of finalising content for a site I just built, and is getting this error when making some changes. It seems to resolve itself after a while, but when it's showing a full site publish doesn't resolve it.. i'm not sure what does to be honest.
Any pointers as to the cause of this would be great. The site is on Umbraco 7.2.8 using MVC. Error is:
Server Error in '/' Application.
ContentTypeService failed to find a content type with alias "ContentPage".
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: System.Exception: ContentTypeService failed to find a content type with alias "ContentPage".
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Exception: ContentTypeService failed to find a content type with alias "ContentPage".] Umbraco.Core.Models.PublishedContent.PublishedContentType.CreatePublishedContentType(PublishedItemType itemType, String alias) +569 Umbraco.Core.Cache.<>cDisplayClass9
1.<GetCacheItem>b__8() +15 Umbraco.Core.Cache.<>c__DisplayClass1a.<GetCacheItem>b__19(String key) +15 System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func2 valueFactory) +83 Umbraco.Core.Cache.StaticCacheProvider.GetCacheItem(String cacheKey, Func
1 getCacheItem) +98 Umbraco.Core.Cache.CacheProviderExtensions.GetCacheItem(ICacheProvider provider, String cacheKey, Func1 getCacheItem) +180 Umbraco.Core.Models.PublishedContent.PublishedContentType.Get(PublishedItemType itemType, String alias) +252 Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent.Initialize() +2214 Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent.get_SortOrder() +27 System.Linq.EnumerableSorter
2.ComputeKeys(TElement[] elements, Int32 count) +147 System.Linq.EnumerableSorter1.Sort(TElement[] elements, Int32 count) +38 System.Linq.<GetEnumerator>d__0.MoveNext() +338 System.Linq.Enumerable.Any(IEnumerable
1 source) +109 Cosec.Repository.Umbraco.HomeRepository.GetHomeViewModel() +992 Cosec.Umbraco.Controllers.HomeController.Home(RenderModel model) +156 lambdamethod(Closure , ControllerBase , Object[] ) +127 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +258 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 parameters) +39 System.Web.Mvc.Async.<>cDisplayClass42.Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248
Okay so it seems I've resolved this issue. The way I resolved it was to edit some content on the item for which preview was failing. Which is weird because I'd tried multiple times to rebuild the umbraco.config file by deleting it and restarting the app, etc. But only editing a field on that item, then saving would fix it.
Anyway, maybe this will help somebody else one day...
Thanks! It helped me to solve the problem. :D
Actual problem is that even after preview was failed, preview cookie still exist, something like UMB_PREVIEW. Remove it, and page will be executed in usual pipeline.
Can you show me how to fixed it ? More clear . Thanks bro
I just delete all the preview files (except for some css and png files), then it just fine, savage.. right?
Not to restart an old thread, but your info was a livesaver :)
Your info helped me to fix a similar exception for 7.5.11 on a typed call to FirstChild() on preview of the home page.
What I noticed was that Umbraco tried to search for the template name and not the alias name. Only after republishing the child node that triggered the error, I was able to preview the home node again.
thanks, David
I have seen this issue and similar issues a couple of times. Can happen when you move code and get and old umbraco.config file in the App_data folder. If you rewiew the contents of that file you might find the aliases searched for, that might not exist anymore... Delete the file and make a republish of all published items normally works for me.
is working on a reply...