Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Greg Berlin 818 posts 634 karma points
    Oct 26, 2015 @ 02:39
    Greg Berlin
    0

    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.<>cDisplayClass91.<GetCacheItem>b__8() +15 Umbraco.Core.Cache.<>c__DisplayClass1a.<GetCacheItem>b__19(String key) +15 System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) +83 Umbraco.Core.Cache.StaticCacheProvider.GetCacheItem(String cacheKey, Func1 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.EnumerableSorter2.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(IEnumerable1 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, IDictionary2 parameters) +39 System.Web.Mvc.Async.<>cDisplayClass42.

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248

  • Greg Berlin 818 posts 634 karma points
    Oct 27, 2015 @ 01:35
    Greg Berlin
    1

    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...

  • Tommi Gustafsson 12 posts 144 karma points
    Jan 04, 2016 @ 10:15
    Tommi Gustafsson
    0

    Thanks! It helped me to solve the problem. :D

  • Nikolay Kush 1 post 71 karma points
    Apr 18, 2016 @ 11:05
    Nikolay Kush
    0

    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.

  • DIDU 5 posts 95 karma points
    Aug 04, 2016 @ 03:58
    DIDU
    0

    Can you show me how to fixed it ? More clear . Thanks bro

  • Michael Wang 2 posts 71 karma points
    Aug 28, 2017 @ 10:43
    Michael Wang
    0

    I just delete all the preview files (except for some css and png files), then it just fine, savage.. right? enter image description here

  • David van de Vliet 15 posts 116 karma points
    Apr 10, 2017 @ 08:02
    David van de Vliet
    0

    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

  • Niklas Uddholm 2 posts 72 karma points
    Feb 11, 2018 @ 23:00
    Niklas Uddholm
    1

    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.

Please Sign in or register to post replies

Write your reply to:

Draft