SQL error in select in sales report

Created on 22 July 2018, over 6 years ago
Updated 13 October 2023, over 1 year ago

Executing admin/commerce/reports/sales I get:

The website encountered an unexpected error. Please try again later.
 Exception in Sales report[sales_report]: SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near 'FROM'
LINE 2: FROM 
        ^: SELECT 
FROM 
{commerce_order_report} commerce_order_report; Array
(
)
 in Drupal\views\Plugin\views\query\Sql->execute() (line 1528 of core\modules\views\src\Plugin\views\query\Sql.php). Drupal\views\ViewExecutable->execute(NULL) (Line: 1451)
Drupal\views\ViewExecutable->render() (Line: 183)

....

This is because the constructed SQL is: "SELECT FROM {commerce_order_report} commerce_order_report" which is invalid syntax with my Postgres at least.
This is obviously connected with the Views generation of the query so might link back to custom Views handling in the module.

Using 8.x-1.0-beta1

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom Jons

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024