Bug with DELTA mode in step 5

Hi,
 
Today I try to re-execute a delta migration and i receive this error :
[Processing][delta] Step #5 migration completed with 100 record(s) in the ‘catalog_product_entity’ table.
.
Status: fail
Message: 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 ‘LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `catalog_product_entity` `t` WHERE sku = ‘DOG-COLLIER-RED’ AND entity_id <> LIMIT 1
 
Any explanation about this ?
How to solve ? and also do I need to re-execute this delta migration after fix the pb ?

2 answers

Profile photo of BIGAND JEROME 630.00 $tone September 20, 2021
Public

I found a lution, it seems due to a modification suggested to avoid problem with SKU :
$con = “sku = ‘” . addslashes($sku2) . “‘ AND entity_id <> {$productId2}”;
$found = Mage2CatalogProductEntity::model()->find($con);

Seems NOT WORK for me, i had reverted back this code change and after this it work … but now i have the probelm of digit inserted in the SKU …

#1
Profile photo of Mall Staff 184060.00 $tone September 21, 2021
Public

Hi there,

i had reverted back this code change and after this it work … but now i have the probelm of digit inserted in the SKU …

For that case, please don’t edit the code in our migration tool at your end. Please keep our original module source code in place. 

Status: fail
Message: 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 ‘LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `catalog_product_entity` `t` WHERE sku = ‘DOG-COLLIER-RED’ AND entity_id <> LIMIT 1

It seems that the issue occurred because you deleted at least one migrated product in M2 after the first migration.

To handle fo that case, you can try these steps:

1. Run the CLI command: 
php -f bin/ubdatamigration clean --step=5

2. And then, you run delta migration in step #5:
php -f bin/ubdatamigration run --step=5 --mode=update;

Regards,
Mall.
 
 

#2

Please login or Register to Submit Answer

Written By

Comments