Document Library blocks report SQL error after upgrade from V9.1.3 to V9.2.6

Hi there,
Just testing an upgrade from 9.1.3 to V9.2.6 on our DEV site. Have found that our Document Library blocks now report “an unexpected error occurred.” Looking into the logs we find this SQL error:

Exception Occurred: /home/ifiv5be6/public_html/updates/concrete-cms/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128 An exception occurred while executing ‘SELECT distinct n.treeNodeID, if(nt.treeNodeTypeHandle=‘file’, fv.fvTitle, n.treeNodeName) as name, if(nt.treeNodeTypeHandle=‘file’, fv.fvDateAdded, n.dateModified) as dateModified, case when nt.treeNodeTypeHandle=‘file_folder’ then 1 else (10 + fvType) end as type, fv.fvSize as size, fv.fvTitle FROM TreeNodes n INNER JOIN TreeNodeTypes nt ON nt.treeNodeTypeID = n.treeNodeTypeID LEFT JOIN TreeFileNodes tf ON tf.treeNodeID = n.treeNodeID LEFT JOIN FileVersions fv ON tf.fID = fv.fID and fv.fvIsApproved = 1 LEFT JOIN (SELECT count(distinct fsf.fsID) as sets, fsf.fID, fsf.fsID, fsf.fsDisplayOrder FROM FileSetFiles fsf WHERE fsf.fsID in (?) GROUP BY fsf.fID) fsf ON tf.fID = fsf.fID LEFT JOIN Files f ON fv.fID = f.fID LEFT JOIN Users u ON f.uID = u.uID LEFT JOIN FileSearchIndexAttributes fsi ON f.fID = fsi.fID WHERE (fsf.sets=?) AND (fsf.sets > 0) AND (n.treeNodeParentID = ?) ORDER BY fv.fvTitle desc LIMIT 20’ with params [9, 1, “690”]:

SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘ifiv5be6_cmw_triple8.fsf.fsDisplayOrder’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (0)

We are still running PHP 7.4.33 (with plans to upgrade to 8.3). Has anyone encountered this error with Document Library blocks ?
Thanks & regards,
Jeff.

I suspect you have come across another variation of this bug

a) Please add your report to the GitHub issue

b) I expect you can dodge the bug by changing your server MySQL configuration to not set ‘ONLY_FULL_GROUP_BY’

Thanks John,

Have noticed that you have already added a comment to your GitHub post about this specific problem.
Will look into changing our SQL configuration with our host and report back.

Regards,

Jeff.

After our host disabled ‘ONLY_FULL_GROUP_BY’ , our Document Library blocks now display without error under V9.2.6.

Jeff.

1 Like