Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

TypeMismatchException in log

Found in

EPiServer.Commerce 11.2.0

Fixed in

EPiServer.Commerce 11.2.3

(Or a related package)

Created

Sep 08, 2017

Updated

Jul 03, 2019

Area

Core

State

Closed, Fixed and tested


Description

Steps to reproduce

  1. Install and configure Episerver Search.
  2. Index the contents via http://localhost:50244/episerver/Cms/Admin/IndexContent.aspx.

This error appears in log file:

EPiServer.Core.TypeMismatchException: Content with id '-1__CatalogContent' is of type 'EPiServer.Core.PageData' which does not inherit required type 'EPiServer.Commerce.Catalog.ContentTypes.CatalogContentBase'
at EPiServer.Core.Internal.DefaultContentLoader.ThrowTypeMismatchException(ContentReference link, Type actual, Type required)
at EPiServer.Core.Internal.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)
at EPiServer.Core.Internal.DefaultContentLoader.Get[T](ContentReference contentLink)
at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.LoadChildrenReferencesAndTypes(ContentReference contentLink, String languageID, Boolean& languageSpecific)
at EPiServer.Core.ContentProvider.<>c_DisplayClass109_0`1.<TryGetChildren>b_0()
at EPiServer.Framework.Cache.ObjectInstanceCacheExtensions.ReadThroughWithWait[T](IObjectInstanceCache cache, String cacheKey, Func`1 readValue, Func`2 evictionPolicy)
at EPiServer.Framework.Cache.ObjectInstanceCacheExtensions.ReadThrough[T](IObjectInstanceCache cache, String key, Func`1 readValue, Func`2 evictionPolicy, ReadStrategy readStrategy)
at EPiServer.Core.ContentProvider.TryGetChildren[T](ContentReference contentReference, String languageID, IList`1& children)
at EPiServer.Core.ContentProvider.GetChildrenReferencesFromCacheOrRepository[T](ContentReference contenReference, String languageID)
at EPiServer.Core.ContentProvider.GetChildrenReferences[T](ContentReference contentReference, String languageID, Int32 startIndex, Int32 maxRows)
at EPiServer.Core.Internal.DefaultContentLoader.GetChildren[T](ContentReference contentLink, LoaderOptions loaderOptions, Int32 startIndex, Int32 maxRows)
at EPiServer.Core.Internal.DefaultContentLoader.GetChildren[T](ContentReference contentLink, LoaderOptions loaderOptions)
at EPiServer.Core.Internal.DefaultContentRepository.GetChildren[T](ContentReference contentLink, LoaderOptions loaderOptions)
at EPiServer.Core.Internal.DefaultContentRepository.GetChildren[T](ContentReference contentLink, CultureInfo language)
at EPiServer.Core.Internal.SlimContentReader.Next()
at EPiServer.Search.Internal.ContentSearchHandlerImplementation.IndexPublishedContent()
at EPiServer.Core.ContentSearchHandler.ReIndex()
at EPiServer.Search.Internal.ReIndexManager.ReIndex()

See http://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2017/9/commerce-11-error-in-the-log/