From 281552ef80a155310a1c16ac6ddc64a8f706155d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Thu, 13 Sep 2018 21:13:25 +0200 Subject: [PATCH] Fix ordering of search result --- .../ext/ep_products/Classes/Service/SearchResultService.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php b/web/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php index 392f765a..aac0b1bf 100644 --- a/web/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php +++ b/web/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php @@ -191,6 +191,9 @@ class SearchResultService implements SingletonInterface }); } - return new SearchResult($data, $total); + // Turn result data into simple array to ensure order in js + $result = array_values($data); + + return new SearchResult($result, $total); } }