Wrong Language Index is being added to Episerver Find

Vote:
 

We see en-US is being added to Episerver Find index, although we have not added en-US language for the site. This started happening after upgrading to Episerver Find version 13. We are currently using Find .NET API Version: 13.0.5.0.  Please note we have langauge "en" active on the site but not "en-US".

We are also encountering large number of exceptions in the log. Here is an example below. After investigating further I found above is the root cause, but I cant find any reference anywhere how to resolve this without reaching out to Episerver and our great community here. I am very certain others might be encountering same issue.

"EPiServer.Find.Cms.ContentIndexer : RD00155D999F0D: An exception occurred while indexing content [Link 2689__CatalogContent] [GUID 00000000-0000-0079-0000-000000001944] [Type ****ProductType] [Name *******]: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at EPiServer.Core.Internal.DefaultContentProvider.GetLanguageId(ILanguageSelector selector)
at EPiServer.Core.Internal.DefaultContentProvider.LoadContent(ContentReference contentLink, ILanguageSelector languageSelector)
at EPiServer.Core.ContentProvider.<>c__DisplayClass121_0.<LoadContentFromCacheOrRepository>b__0()
at EPiServer.Framework.Cache.ObjectInstanceCacheExtensions.ReadThroughWithWait[T](IObjectInstanceCache cache, String cacheKey, Func`1 readValue, Func`2 evictionPolicy)
at EPiServer.Core.Internal.ContentInstanceCache.ReadThrough(ContentReference contentLink, String selectedLanguage, Func`1 readValue)
at EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(ContentReference contentreference, ILanguageSelector selector)
at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItem(ContentProvider provider, ContentReference contentLink, LoaderOptions loaderOptions)
at EPiServer.Core.Internal.DefaultContentLoader.TryGet[T](ContentReference contentLink, LoaderOptions loaderOptions, T& content)
at EPiServer.Commerce.Catalog.AssetUrlResolver.ValidateCorrectType[TContentMedia](ContentReference contentLink)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at EPiServer.Commerce.Catalog.AssetUrlResolver.GetSelectedItem[TContentMedia](ItemCollection`1 mediaList, String defaultGroup)
at EPiServer.Commerce.Catalog.AssetUrlResolver.GetAssetUrl[TContentMedia](IAssetContainer assetContainer, Func`2 resolveForSelected)
at EPiServer.Find.Commerce.IAssetContainerExtensions.DefaultImageUrl(IAssetContainer content)
at EPiServer.Find.DelegateValueProvider`2.GetValue(Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at EPiServer.Find.Json.Serializer.SerializeToTextWriter(JsonSerializer serializer, Object value, TextWriter textWriter)
at EPiServer.Find.Json.Serializer.SerializeObjectsToJsonRequest(JsonSerializer serializer, IJsonRequest jsonRequest, IEnumerable values)
at EPiServer.Find.Api.BulkCommand.Execute(List`1& serializationFailures)
at EPiServer.Find.Api.BulkCommand.Execute()
at EPiServer.Find.Cms.ContentIndexer.IndexWithRetry(IContent[] contents, Int32 maxRetries, Boolean deleteLanguageRoutingDuplicatesOnIndex)
at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 content, IndexOptions options)
at EPiServer.Find.Cms.ContentIndexer.IndexBatch(IEnumerable`1 content, Action`1 statusAction, Int32& numberOfContentErrors, Int32& indexingCount, Boolean deleteLanguageRoutingDuplicatesOnIndex)",

Regards, 
Sujit

#206131
Aug 03, 2019 8:54
Vote:
 

Hi Again, 

I was able to clear the bad catalog language by adding the language "en-US" to the site temporarily and then deselected/deactivated it from catalog and removed the language from the site. I am hoping rerunning the Find index will clear the bad content from index.

Regards,

Sujit

#206132
Aug 04, 2019 4:03
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.