0

How to fix this error when i will display the associated product of a grouped product from the admin. The error log indicates : Unknown column 'position' in 'order clause' in the table catalog_product_entity

Here is the log :

SELECT e., at_status.value AS status, links.link_id FROM catalog_product_entity AS e INNER JOIN catalog_product_entity_int AS at_status ON (at_status.entity_id = e.entity_id) AND (at_status.attribute_id = '96') AND (at_status.store_id = 0) INNER JOIN catalog_product_link AS links ON links.linked_product_id = e.entity_id AND links.link_type_id = 3 WHERE (((e.required_options != '1') OR (e.required_options IS NULL))) AND (at_status.value IN(1, 2)) AND (links.product_id = 1015) AND (e.entity_id != '1015') ORDER BY position ASC SQLSTATE[42S22]: Column not found: 1054 Unknown column 'position' in 'order clause', query was: SELECT e., at_status.value AS status, links.link_id FROM catalog_product_entity AS e INNER JOIN catalog_product_entity_int AS at_status ON (at_status.entity_id = e.entity_id) AND (at_status.attribute_id = '96') AND (at_status.store_id = 0) INNER JOIN catalog_product_link AS links ON links.linked_product_id = e.entity_id AND links.link_type_id = 3 WHERE (((e.required_options != '1') OR (e.required_options IS NULL))) AND (at_status.value IN(1, 2)) AND (links.product_id = 1015) AND (e.entity_id != '1015') ORDER BY position ASC

1
  • It is an SQL query, you should tell us the error you get from error.log. Commented Feb 18, 2016 at 16:33

1 Answer 1

0

I found the solution on my Magento (hopefully this is the same for you). I think it's due to Magmi, I used it to import my products.

The problem was that the table "catalog_product_link_attribute" was empty, and then the column "product_link_attribute_id" in "catalog_product_link_attribute_int" table was always set to "NULL".

I did a fresh install of Magento and created a grouped product to have a functional grouped product sample and here are the data if you want for the table "catalog_product_link_attribute" :

INSERT INTO `catalog_product_link_attribute` (`product_link_attribute_id`, `link_type_id`, `product_link_attribute_code`, `data_type`) VALUES
(1, 1, 'position', 'int'),
(2, 3, 'position', 'int'),
(3, 3, 'qty', 'decimal'),
(4, 4, 'position', 'int'),
(5, 5, 'position', 'int');

Once you've entered these rows into your database, simply update "product_link_attribute_id"" field from "catalog_product_link_attribute_int" to "2" and it should be fine!

Hope this helps ;)

2
  • Well thank you for your help. This liberated catalog access. Commented Feb 23, 2016 at 10:33
  • Glad it worked for you too :) Be careful if you reuse Magmi for grouped products, I assume this was the reason it failed ;) Or maybe it will work now that your "catalog_product_link_attribute" table isn't empty anymore, I didn't try a new import :)
    – Axel B
    Commented Feb 23, 2016 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.