PDOException: SQLSTATE[42000]: Syntax error or access violation: 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause: SELECT currency_code, SUM(amount) AS amount FROM {commerce_payment_transaction}; Array ( ) funktiossa commerce_reports_customers() (rivi 79 tiedostossa /var/www/--xxremovedxxxx--sites/all/modules/commerce_reports/commerce_reports.blocks.inc).

What happened and how to fix. only the desktop view fails.. other columns will work when accessed through modules.

Comments

cvangysel’s picture

Status: Active » Closed (won't fix)

The tax reporting module has completely changed in the current version in the repository; the code that caused this bug doesn't exist anymore.
I'm planning on releasing a beta version soon, I hope it'll fix your problems.

Thanks for the report!

steve.m’s picture

Looks like this isn't actually fixed.

It still happens in alpha4 and the -dev versions, when visiting the admin/commerce/reports dashboard page. It happens without the tax reporting module enabled, so it's something else.

steve.m’s picture

It looks like the SQL statements at lines 46 and 79 can be cleaned up by adding 'GROUP BY currency_code'. It might be necessary to change the reporting logic, however, to handle the case of a store selling in multiple currencies.

steve.m’s picture

Status: Closed (won't fix) » Needs review

(I'm taking the liberty of opening this issue again for review.)

cvangysel’s picture

Status: Needs review » Closed (fixed)

Right, no idea why I thought this was related to the tax reporting module. There should indeed be a GROUP BY part in those queries.
Anyhow, I fixed it in the HEAD of the 7.x-3.x branch.

Thanks!

  • Commit 6ddbd1d on 7.x-3.x, 7.x-4.x, 2023381-commerce-coupon by cvangysel:
    Issue #1777510: statistic blocks were missing multiple currency support