Mysql Error on Step 5

Hello, I am getting an error on step 5:
CDbCommand failed to execute the SQL statement: 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 ‘AND entity_id = 15977 LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `catalog_product_entity_int` `t` WHERE attribute_id = 692 AND value = AND entity_id = 15977 LIMIT 1
Any idea what would cause this?  Thanks.

7 answers

Profile photo of Mall Staff 118860.00 $tone September 9, 2019
Public

Hi there,

The SQL statement executed was: SELECT * FROM `catalog_product_entity_int` `t` WHERE attribute_id = 692 AND value = AND entity_id = 15977 LIMIT 1

That issue because your M1 database has at least one record which has bad data in table ‘catalog_product_super_attribute_pricing’. This data record has relation with a none exists attribute option in table ‘eav_attribute_option’.
To solve that issue, you could do steps below:
+ Run below SQL in your M1 database to delete the bad record I mentioned:

DELETE FROM catalog_product_super_attribute_pricing WHERE value_index IS NULL OR value_index = '' OR value_index NOT IN (SELECT option_id FROM eav_attribute_option);

+ Once done, continue data migration in step #5 by run CLI command:
php -f bin/ubdatamigration run --step=5;
Regards,
Mall.

#1
Profile photo of Mall Staff 118860.00 $tone September 10, 2019
Public

Hi there,

Unfortunately, that didn’t resolve the isssue (it did find 1 record though).

So, that is strange. Lets provide me information about your instance:
+ URL and Admin credentials of your site
+ SSH credentials and lets us know the path to M2 folder
I will help to check further and get back you then.
Regards,
Mall.

#3
Profile photo of Mall Staff 118860.00 $tone September 10, 2019
Public

Hi there,

I have checked your instance and saw that you did run the SQL as my suggested but the issue you mentioned still persists because the related attribute option on that issue hasn’t been migrated yet.
 
I tried to debug further and saw the related attribute option had the option_id = 9551 in M1: https://prnt.sc/p428r2
But that attribute option hasn’t been migrated by our migration tool. I have checked in the log table of our migration tool: https://prnt.sc/p4299d. It indicated that was a newly added attribute option in your M1 site.
 
Thus, to solve the issue, you need to run delta with the ‘update’ mode in the step #3 of our migration tool first (this helps to migrate the newly added attribute options and other):
php -f bin/ubdatamigration run --step=3 --mode=update;

+ Once done, you continue with the data migration in the step #5 by running this command: 
php -f bin/ubdatamigration run --step=5;
 
Hope that helps. 
 
Regards,
Mall.

#5

Please login or Register to Submit Answer

Written By

Comments