Hi
Testing on DW 9.16.6, Swift 1.25.1
Test Environment - https://cleanswift.mydwsite1.com/
We are trying to sort a product list having more that one criteria on SortBy.
Here is a url example - https://cleanswift.mydwsite1.com/e-bikes/e-mountain-bikes?PageSize=12&RequestType=UpdateList&SortBy=-Price,Name
We are getting the following error
An error occurred while attaching module (Dynamicweb.Frontend.Content)
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.List`1.get_Item(Int32 index) at Dynamicweb.Indexing.Querying.QueryHelper.GetSortInformation(IQuery query, String sortBy, IList`1 sortDirections) at Dynamicweb.Ecommerce.Indexing.ProductQueryHelper.GetSortInformation(IQuery query, ProductCatalogSettings settings, String groupId) at Dynamicweb.Ecommerce.Indexing.ProductQueryHelper.CreateQuerySettings(ProductCatalogSettings settings, IQuery query, PagingHandler pagingHandler, NameValueCollection requestValues) at Dynamicweb.Ecommerce.Indexing.ProductQueryHelper.GetQueryAndQuerySettings(ProductCatalogSettings settings, ContentModule contentModule, NameValueCollection requestValues, QuerySettings& querySettings) at Dynamicweb.Ecommerce.ProductCatalog.ProductCatalogFrontend.GetContent() at Dynamicweb.Frontend.Content.GetModuleOutput(Paragraph paragraph, PageView pageview)
Looking at DW code, on file Dynamicweb.Indexing/Querying/QueryHelper.cs we see the following
It seems the sortInfoes object is not expected to have more than one entry.
Can you please clarify if this is the expected behavior or a bug?
Thank you.