Issue Bug Closed

#77278List module throws SQL exception

Markus Klein 07/28/16, 10:57 updated 10/02/18, 11:09

Description

Having a sysfolder with news the following exception is thrown:

An exception occurred while executing 'SELECT COUNT(*) FROM `tt_content` WHERE (`tt_content`.`pid` = 5) AND (1=1) AND ((`tt_content`.`deleted` = 0) AND ((`tt_content`.`t3ver_wsid` = 0) OR (`tt_content`.`t3ver_state` <= 0))) ORDER BY `sorting` ASC LIMIT 21': Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause

> Reject queries for which the select list, HAVING condition, or ORDER BY list refer to nonaggregated columns that are neither named in the GROUP BY clause nor are functionally dependent on (uniquely determined by) GROUP BY columns.

This query should not have an ORDER BY and also the LIMIT is questionable.

Reviews 1