Closed clintcfavor closed 3 years ago
@clintcfavor Please get the branch and let me know if it works https://github.com/episerver/Foundation/tree/bugfix/732-sort-by-price-wont-sort
We have tested the fix on our local environment and these are our findings when testing the sort by price:
The fix doesn't work when using the current find index of this fix (
When using episerverab_index55794, it sorted products by price correctly only on some subcategories., i.e., Men > Sweater, but didn't work on the main categories and other subcategories. After some time navigating the site, the sort by price doesn't work correctly again, as seen in this screenshot below:
When this happens, we clear and reindex for it to work again as expected.
Here is an error log when products don't sort or when there are no products displayed on the category pages:
System.Net.WebException: The remote name could not be resolved: 'emea13.find.episerver.net' at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at EPiServer.Find.Connection.JsonRequest.WriteBody(String body) at EPiServer.Find.Api.SearchCommand
1.Execute()
at EPiServer.Find.Client.Search[TResult](SearchRequestBody requestBody, Action1 commandAction) at EPiServer.Find.SearchExtensions.GetProjectedResult[TResult](ISearch
1 search, SearchContext context)
at EPiServer.Find.SearchExtensions.GetResult[TResult](ISearch1 search) at EPiServer.Find.Cms.SearchRequestExtensions.GetContentResult[TContentData](ITypeSearch
1 search, Int32 cacheForSeconds, Boolean cacheForEditorsAndAdmins)
at Foundation.Features.Search.SearchService.GetSearchResults(IContent currentContent, FilterOptionViewModel filterOptions, String selectedfacets, IEnumerable1 filters, Int32 catalogId) in D:\Test Projects\Foundation\Src\Foundation\Features\Search\SearchService.cs:line 584 at Foundation.Features.Search.SearchService.Search(IContent currentContent, FilterOptionViewModel filterOptions, String selectedFacets, Int32 catalogId) in D:\Test Projects\Foundation\Src\Foundation\Features\Search\SearchService.cs:line 119 at Foundation.Features.Search.SearchViewModelFactory.Create[TContent](TContent currentContent, String selectedFacets, Int32 catalogId, FilterOptionViewModel filterOption) in D:\Test Projects\Foundation\Src\Foundation\Features\Search\SearchViewModelFactory.cs:line 72 at Foundation.Features.Search.Category.CategoryController.<Index>d__2.MoveNext() in D:\Test Projects\Foundation\Src\Foundation\Features\Search\Category\CategoryController.cs:line 38 --- End of stack trace from previous location where exception was thrown ---
With these findings, the sorting works best when we use our index but we have to clear and reindex when the sorting doesn't work again. Please check if this has something to do with our index.
@mllrdev-joanne-ferrolino Please update the Find index to your own credentials and retest the site. The default index (
Describe the bug When trying to sort the category by price, the price doesn't sort in correct order.
To Reproduce Steps to reproduce the behavior:
Expected behavior Prices should be sorted ($280, $400, $540, etc.)
Screenshots
Desktop (please complete the following information):
Additional context Attaching a screenshot of an exception in the Immediate Window