Execute the stock synchronization via the ECommerceSynchronizeStockToSite function. ( trigger via cron job)
Observe the SQL error generated regarding the GROUP BY clause.
Impact:
This error prevents the correct updating of stocks, which can lead to inconsistencies in stock data between the management system and the e-commerce platform.
Environment:
Dolibarr Version: 19.0.1
mysql:latest
Potential Solution:
Modify the SQL query to be compatible with the only_full_group_by mode, ensuring that all non-aggregated columns in the SELECT clause are included in the GROUP BY clause, or disable the only_full_group_by mode if it is compatible with the rest of the application.
Steps to Reproduce the Error:
ECommerceSynchronizeStockToSite
function. ( trigger via cron job)GROUP BY
clause.Impact:
This error prevents the correct updating of stocks, which can lead to inconsistencies in stock data between the management system and the e-commerce platform.
Environment:
Potential Solution:
Modify the SQL query to be compatible with the
only_full_group_by
mode, ensuring that all non-aggregated columns in theSELECT
clause are included in theGROUP BY
clause, or disable theonly_full_group_by
mode if it is compatible with the rest of the application.My Solution: