Developer forum

Forum » Ecommerce - Standard features » Errors loading facets

Errors loading facets

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a project where I get this error:
 

System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.CollectFacetFieldsToBeRemoved(Dictionary`2 facetFieldsToBeRemoved, List`1 groupFacets)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.CreateView(IEnumerable`1 facetGroups, IDictionary`2 facetGroupResults, IDictionary`2 facetParameters, IEnumerable`1 queryParameters, Boolean showFacetOptionsWithNoResults)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewModelFactory.CreateView(IEnumerable`1 facetGroups, IDictionary`2 facetGroupResults, IDictionary`2 facetParameters, IEnumerable`1 queryParameters, Boolean showFacetOptionsWithNoResults)
   at Dynamicweb.Ecommerce.Indexing.ProductQueryHelper.GetProductsAutoIdsFromIndexQuery(IQuery query, ProductCatalogSettings settings, QuerySettings querySettings, IEnumerable`1& facetViewModel, IEnumerable`1& spellCheckerResult)
   at Dynamicweb.Ecommerce.ProductCatalog.ProductCatalogFrontend.RenderProductList(ProductCatalogSettings settings, QuerySettings querySettings, IQuery query, String groupId, Boolean feed)
   at Dynamicweb.Ecommerce.ProductCatalog.ProductCatalogFrontend.GetContent()
   at Dynamicweb.Frontend.Content.GetModuleOutput(Paragraph paragraph, PageView pageview)

 

The error is displayed only for one category.

I have removed all Facets and parameters and expressions based on product fields but I don't seem to be able to get rid of this error.

How can I investigate this further and identify the data that is causing this error?

The solution is 9.15.12

 

Thank you,

Adrian


Replies

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

Hi Adrian,

Did you manage to resolve this issue, or is it still relevant?

BR
Snedker

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply
This post has been marked as an answer

Hi Morten,

Thank you for reaching out.

We have managed to find out the problem.

In the settings of the group, there was something invalid selected in the facets to be displayed. We have cleared all saved data in those fields and everything went back to normal.

It should probably be checked in the code somewhere to prevent these situations as it is very unclear where the issue is.

Thank you,
Adrian

Votes for this answer: 1

 

You must be logged in to post in the forum