Hello,
Can you help me with a problem?
On such queries "?sort=name&order=asc" or "?sort=total_sales&order=desc" the site gives 500 error. The sorting at the front office is working. (PS 8.1.7, PHP 8.1.29)
"https://www.datawaysecurity.com.ua/uk/11-external-encrypted-drives?sort=total_sales&order=desc"
PHP Error
PrestaShop\PrestaShop\Core\Exception\CoreException: Invalid argument in /home/dataways/datawaysecurity.com.ua/www/src/Core/Product/Search/SortOrder.php:127 Stack trace:
#0 /home/dataways/datawaysecurity.com.ua/www/classes/controller/ProductListingFrontController.php(332): PrestaShop\PrestaShop\Core\Product\Search\SortOrder::newFromString('desc') #1 /home/dataways/datawaysecurity.com.ua/www/classes/controller/ProductListingFrontController.php(635): ProductListingFrontControllerCore->getProductSearchVariables()
#2 /home/dataways/datawaysecurity.com.ua/www/controllers/front/listing/CategoryController.php(139): ProductListingFrontControllerCore->doProductSearch('catalogue/listing...', Array)
#3 /home/dataways/datawaysecurity.com.ua/www/classes/controller/Controller.php(319): CategoryControllerCore->initContent() #4 /home/dataways/datawaysecurity.com.ua/www/classes/Dispatcher.php(510): ControllerCore->run()
#5 /home/dataways/datawaysecurity.com.ua/www/index.php(28): DispatcherCore->dispatch()
#6 {main} thrown in /home/dataways/datawaysecurity.com.ua/www/src/Core/Product/Search/SortOrder.php on line 127