When trying to access the infocollection admin interface on a server with MySQL 5.7+ installed there will be a fatal error:
An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT eco.id AS content_id, eco.name, ecot.main_node_id, ecc.serialized_name_list, ecc.identifier AS class_identifier FROMezcontentobjecteco LEFT JOINezcontentobject_treeecot ONeco.id=ecot.contentobject_idINNER JOINezcontentclassecc ONeco.contentclass_id=ecc.idWHERE (ecc.version = 0) AND (eco.id IN (637, 1414, 1563)) GROUP BYecot.main_node_idLIMIT 10'
Using the max aggregation function on all selected fields should be ok in this case because the column's values will always be the same for all rows matched by the group by clause.
When trying to access the infocollection admin interface on a server with MySQL 5.7+ installed there will be a fatal error:
An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT eco.id AS content_id, eco.name, ecot.main_node_id, ecc.serialized_name_list, ecc.identifier AS class_identifier FROM
ezcontentobjecteco LEFT JOIN
ezcontentobject_treeecot ON
eco.
id=
ecot.
contentobject_idINNER JOIN
ezcontentclassecc ON
eco.
contentclass_id=
ecc.
idWHERE (ecc.version = 0) AND (eco.id IN (637, 1414, 1563)) GROUP BY
ecot.
main_node_idLIMIT 10'
This is caused by MySQL's
only_full_group_by
mode being turned on as explained in this issue on Stackoverflow.It can be fixed by aggregating the selected columns in the corresponding controller instead of only
select
ing the values which would produce unpredictable results.Using the
max
aggregation function on allselect
ed fields should be ok in this case because the column's values will always be the same for all rows matched by the group by clause.