A lovely cryptic message when publishing content "Culture is not supported. Parameter name: name h is an invalid culture identifier"

Vote:
 

h is a veeery strange culture identifier, so the error seems legit.

After some time debugging i came to realise that this is yet another issue caused by having a lot of languages (Our instance has 125 enabled epi languages)

Here is the stacktrace:

at System.Globalization.CultureInfo.GetCultureInfo(String name)
at EPiServer.Commerce.Catalog.Provider.Construction.CatalogBuilder.ReadCatalogProperties(DataTable table, Dictionary`2 contentMap)
at EPiServer.Commerce.Catalog.Provider.Construction.CatalogBuilder.CreateVersions(IList`1 contentLinks)
at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.ConstructContent(IList`1 contentLinks, Func`3 createContentFunc)
at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.LoadSpecificContentVersions(IList`1 contentVersions)
at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.BatchLoad(IList`1 contentLinks, Func`2 dbLoader)
at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.LoadContents(IList`1 contentReferences, ILanguageSelector selector)
at EPiServer.Core.ContentProvider.GetContentBatch(IList`1 batch, ILanguageSelector selector, List`1& contents, Dictionary`2& contentMap)
at EPiServer.Core.ContentProvider.GetScatteredContents(IEnumerable`1 contentLinks, ILanguageSelector selector)
at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItems(ContentProvider provider, IList`1 contentLinks, LoaderOptions loaderOptions)
at EPiServer.Core.Internal.DefaultContentLoader.GetItems(IEnumerable`1 contentLinks, LoaderOptions loaderOptions)
at EPiServer.Find.Commerce.CatalogEventIndexer.IndexContentInAllLanguages(IContent content)
at EPiServer.Find.Commerce.CatalogContentEventListener.IndexContentsIfNeeded(IEnumerable`1 contents, Action`1 indexAction, IDictionary`2 cachedReindexContentOnEventForType, Func`1 isReindexingContentOnUpdates)
at EPiServer.Find.Commerce.CatalogContentEventListener.IndexContentsIfNeeded(IEnumerable`1 contentLinks, Action`1 indexAction)
at EPiServer.Find.Commerce.CatalogContentEventListener.CatalogNodeUpdated(CatalogContentUpdateEventArgs catalogContentUpdateEventArgs, Action`1 indexAction)
at EPiServer.Find.Commerce.CatalogContentEventListener.CatalogEventUpdated(Object sender, EventNotificationEventArgs e)
at EPiServer.Events.Clients.Event.Raise(Guid raiserId, Object param, EventRaiseOption raiseOption)

After some sql profiling i found this sproc was called: "ecfVersion_ListByWorkIds", which in turn calls this sproc: "ecfVersionCatalog_ListByWorkIds"

When i run it i see the languages for our catalog comes out as "ar-ae;ar-bh;ar-dz;ar-eg;ar-iq;ar-jo;ar-kw;ar-lb;ar-ly;ar-ma;ar-om;ar-qa;ar-sa;ar-tn;ar-ye;az;bg;bg-bg;bs;cs-cz;da-dk;de-at;de-de;el-gr;en;en-ag;en-ai;en-au;en-bb;en-bm;en-bs;en-bz;en-ca;en-dm;en-gb;en-gd;en-gy;en-hk;en-id;en-ie;en-il;en-jm;en-kn;en-ky;en-lc;en-ms;en-my;en-nz;en-ph;en-pr;en-sg;en-si;en-tt;en-us;en-vc;en-vg;en-vi;en-za;es-419;es-ar;es-bo;es-cl;es-co;es-cr;es-do;es-ec;es-es;es-gt;es-hn;es-mx;es-ni;es-pa;es-pe;es-py;es-sv;es-uy;es-ve;fi-fi;fr-be;fr-ca;fr-fr;fr-gp;fr-ht;fr-mq;hi-in;hr-hr;hu-hu;h"

That last one is lovely, right? :)

As it turns out "ecfVersionCatalog_ListByWorkIds" calls a custom function called "fn_JoinCatalogLanguages()" that has this lovely nugget in it: "DECLARE @RetVal nvarchar(512)"

that means that a maximum of 512 characters of combined comma-delimited language codes can be returned, if it goes over then you get to see the if you are lucky to have the alst language code being complete or incomplete.

Could someone at epi please increase the retval of this function for the (admittedly few) of us that have a lot of languages.

Cheers

#207225
Sep 13, 2019 12:31
Vote:
 

Because you asked nicely, so there is no reason to refuse. I'll file a bug and let Commerce team handle it.

EDIT: the bug has been fixed and will be included in Commerce 13.8. Thanks for letting us know

#207229
Edited, Sep 13, 2019 15:02
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.