Bruno17 / MIGX

MIGX for revo 2.2 and above
84 stars 78 forks source link

Error 42000 / sql_mode=only_full_group_by #380

Closed 4ntz closed 3 years ago

4ntz commented 3 years ago

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
)
Ibochkarev commented 3 years ago

@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 3 years ago

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.
Ibochkarev commented 3 years ago

@4ntz disable system settings log_deprecated

4ntz commented 3 years ago

thank you @Ibochkarev