Closed (fixed)
Project:
Commerce Backoffice
Version:
7.x-1.2
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2013 at 18:19 UTC
Updated:
3 Jun 2013 at 08:50 UTC
Was trying to use 'quick edit' at 'admin/commerce/products', but t was showing nothing.
At views page I noticed this error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS commerce_product_, commerce_product.title AS commerce_product_title, commerce' at line 1
And this error is caused by this query:
SELECT commerce_product. AS commerce_product_, commerce_product.title AS commerce_product_title, commerce_product.sku AS commerce_product_sku, commerce_product.product_id AS product_id, '' AS field_data_field_images__entity_type
FROM
{commerce_product} commerce_product
LEFT JOIN {field_data_field_product} field_data_field_product ON commerce_product.product_id = field_data_field_product.field_product_product_id AND field_data_field_product.deleted = '0'
INNER JOIN {node} node_field_data_field_product ON field_data_field_product.entity_id = node_field_data_field_product.nid
WHERE (( (node_field_data_field_product.nid = '15' ) ))Its really strange because I haven`t chaged anything in this view, but the query is different from default..
Comments
Comment #1
bojanz commentedYour view has a broken relationship from node to product.
Maybe because you have a nonstandard product reference field (it might not be called "field_product" on your machine).
Try reverting the view, if that fails, edit it and fix it manually (by adding the relationship).
Comment #2
lanzs commentedThanks for response!
Yes, broken relationship caused problems. For now its solved.