Sorting products by cheapest or most expensive price is broken #10266
Labels
Critical
Issues and PRs, which are critical and should be fixed ASAP.
Potential Bug
Potential bugs or bugfixes, that needs to be reproduced.
Sylius version affected: 1.4.0
Description
When sorting products in the shop by cheapest or most expensive price, Sylius catches an SQL error.
Steps to reproduce
To reproduce it, you can simply go to the Sylius demo with this link : https://master.demo.sylius.com/en_US/taxons/t-shirts/men and sort items by cheapest price or most expansive price. You got a 500 error.
Possible Solution
SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'sylius_dev.s5_.price' which is not in SELECT list; this is incompatible with DISTINCT
The error says that it should add ORDER BY parameters in the SELECT clause.
The text was updated successfully, but these errors were encountered: