CDbCommand failed to execute the SQL statement

We got this when migrating products. Please advise what to do next.

Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted. The SQL statement executed was: SELECT * FROM `catalog_product_entity_media_gallery_value` `t` WHERE value_id = 25951 AND store_id =1 LIMIT 1

and on the frontend we got:

1 exception(s): Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 46 Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 46 #0 /srv/public_html/vendor/magento/module-catalog/Model/CategoryRepository.php(141): Magento\Framework\Exception\NoSuchEntityException::singleField('id', '46') #1 /srv/public_html/app/code/Ubertheme/UbMegaMenu/Helper/Mega.php(624): Magento\Catalog\Model\CategoryRepository->get('46', '1')

1 answer

Profile photo of Mall Staff 184060.00 $tone March 14, 2019
Public

Hi there,

Status: fail Message: CDbCommand failed to execute the SQL statement: SQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted. The SQL statement executed was: SELECT * FROM `catalog_product_entity_media_gallery_value` `t` WHERE value_id = 25951 AND store_id =1 LIMIT 1

It seems your MySQL was interrupted at that point of time only. Please try to continue migrating in the step #5 by running the CLI command:
php -f bin/ubdatamigration run --step=5

1 exception(s): Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 46 Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 46 #0 /srv/public_html/vendor/magento/module-catalog/Model/CategoryRepository.php(141): Magento\Framework\Exception\NoSuchEntityException::singleField(‘id’, ’46’) #1 /srv/public_html/app/code/Ubertheme/UbMegaMenu/Helper/Mega.php(624): Magento\Catalog\Model\CategoryRepository->get(’46’, ‘1’)

That was because you had added a menu item link to the category id 46, but the category which had entity_id = 46 did not exist in the catalog_category_entity table. To solve that issue, you must re-update the associated category or delete that menu item in the back-end of Ub Megamenu.

Regards,
Mall.

#1

Please login or Register to Submit Answer

Written By

Comments