Bruno17/MIGX

Error 42000 / sql_mode=only_full_group_by

4ntz opened this issue · 4 comments

4ntz commented

MODX 2.8.3-pl
MIGX 2.13.0-pl
PHP 7.4.2
MySQL 5.7.26

When editing/saving a config in MIGX CMP, my error log keeps filling up with this message:

[2021-08-02 21:36:31] (ERROR @ /Applications/MAMP/htdocs/mysite/core/xpdo/om/xpdoobject.class.php : 240) Error 42000 executing statement: 
Array
(
    [0] => 42000
    [1] => 1055
    [2] => Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'mydb.migxConfig.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
)

@4ntz try
in core/config/config.inc.php

$driver_options = array (
  PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
  PDO::MYSQL_ATTR_INIT_COMMAND => "SET sql_mode = 'TRADITIONAL'"
);
4ntz commented

thanks @Ibochkarev , that removes the error.
Now I am left with this message:

[2021-08-02 22:14:46] (ERROR in modProcessor::run @ /Applications/MAMP/htdocs/mysite/core/model/modx/modprocessor.class.php : 185) Flat file processor support, used for action mgr/migxdb/update with path /Applications/MAMP/htdocs/mysite/core/components/migx/processors/mgr/migxdb/update.php, is deprecated since version 2.7.0. 

[2021-08-02 22:14:46] (ERROR @ /Applications/MAMP/htdocs/mysite/core/components/migx/processors/mgr/migxconfigs/update.php : 406) modCacheManager::clearCache is deprecated since version 2.1.0. Use modCacheManager::refresh() instead.

@4ntz disable system settings log_deprecated

4ntz commented

thank you @Ibochkarev