OPEN-DSI / ecommerceng_woosync

WooSync, synchronize Woocommerce and Dolibarr
GNU General Public License v3.0
71 stars 46 forks source link

SQL Error Related to `only_full_group_by` Mode During Stock Update #130

Open donowr opened 4 months ago

donowr commented 4 months ago

image

Steps to Reproduce the Error:

  1. Execute the stock synchronization via the ECommerceSynchronizeStockToSite function. ( trigger via cron job)
  2. 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:

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.

My Solution:

image

donowr commented 4 months ago

I can make a PR if you want