error after Refresh Statistics

Error on my home page after I performed the refresh lifetime stattistics;
Error filtering template: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘qty_ordered’ in ‘having clause’, query was: SELECT `e`.`entity_id` FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_category_product_index_store1` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=’1′ AND cat_index.visibility IN(2, 4) AND cat_index.category_id=’2′ INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = ‘1’ AND price_index.customer_group_id = 0 INNER JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 WHERE (e.entity_id IN((SELECT `cat`.`product_id` FROM `catalog_category_product` AS `cat` WHERE (cat.category_id IN(‘3’, ‘8’, ’12’))))) AND (stock_status_index.stock_status = 1) GROUP BY `e`.`entity_id` HAVING (qty_ordered > 0)
Please assist, website is awaiting to launch.
 

11 answers

Profile photo of Mall Staff 184060.00 $tone September 1, 2018
Public

Hi there,
It seem you missing reindex the data after migrated with our migration tool. Please try reindex your data and clean the Magento cache.
And tell me know how it goes.
Regards,
Mall.

#1
Profile photo of Mall Staff 184060.00 $tone September 4, 2018
Public

Hi there,

Did that, still the same, I had to roll back. It seems like i’m not be able to performe the refresh lifetime statistics function at all.

The refresh lifetime statistics function you mentioned is a Magento core function. If you still need us to take a closer look into that issue, please provide me the following credentials: 

  • Admin URL of your M2 instance
  • Admin and SSH credentials of your M2 instance
  • Let me know the path to your M2 root folder

I will check further and get back to you then.
PS. Please make sure you mark your reply ‘private’, then it’s safe to provide you site credentials via this thread.

Regards,
Mall.

#3
Profile photo of Mall Staff 184060.00 $tone September 5, 2018
Public

Hi there,

however the category url is not working now

I have checked in your instance and I saw there are a lot of URL rewrite for categories in URLs rewrite management: http://i.prntscr.com/ySlJOgjcTWOWlJCSiTKmEA.png
But I saw you have not set the migrated root category named ‘Default Migrated’ for the default Store of the default website in your instance yet: http://i.prntscr.com/ghdFd3-ERAqaDZH_zGhARA.png
And that is root of the category URL issue you mentioned. To solve that, you must set the migrated root category as Root category of the default store of default website. And then, reindex the data and clean the M2 cache.
And tell me know how it goes.
Regards,
Mall.

#6
Profile photo of Mall Staff 184060.00 $tone September 8, 2018
Public

Hi there,

When I place a test order, I get this error message “Unique constraint violation found“, I google online and I found this- https://magecomp.com/blog/fix-unique-constraint-violation-found-magento-2-checkout-after-migration/

For each store view migrated, let’s open it and click to save button in back-end.
Once done, re-check the issue you mentioned. And tell me know how it goes then.
Regards,
Mall.

#8
Profile photo of Mall Staff 184060.00 $tone September 10, 2018
Public

Hi there,

I notice, this is happening on braintree only. 

It seems that issue relates to Magento core functions. 
Anyway, I couldn’t access your instance at my end now: http://i.prntscr.com/4_MqtU4VQsmpipYtZYW5nw.png
Please help to re-provide me your site info below so that I can check further into Braintree issue you mentioned:

  • Admin url of your M2 instance
  • Admin and SSH credentials of your M2 instance
  • Let me know the path of your web root folder

Regards,
Mall.

#11

Please login or Register to Submit Answer

Written By

Comments