Error in step 6

 When running step 6 from command line I get the below error.
Using latest version opf the tool (3.0.9)
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 ‘AND child_id = 28 LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `catalog_product_relation` `t` WHERE parent_id =  AND child_id = 28 LIMIT 1

  1. Profile photo of Oystein BaadsvikToby 440.00 $tone July 3, 2017
    This question was supposed to be named: Error in step 5.I think I found a solution:I went to the source database and ran some queries to find which entries in the product relation tables that was missing a parent in the catalog_product_entity tableI ran this query (modified to fit the table) in these tables:SELECT * FROM `catalog_product_bundle_selection` WHERE `parent_product_id` NOT IN (SELECT `entity_id` FROM `catalog_product_entity`)Tables:catalog_product_relationscatalog_product_bundle_optioncatalog_product_bundle_option_valuecatalog_product_bundle_option_selectionIn all these cases the query returned between 4 and 160 row. in other words orphan rows.I deleted these rows after backing up.This allowed your script to proceed.Is this the right method?

1 answer

Profile photo of Mall Staff 184060.00 $tone July 3, 2017
Public

Hi there,

SELECT * FROM `catalog_product_relation` `t` WHERE parent_id =  AND child_id = 28 LIMIT 1

That because your database has some records with bad data in the table catalog_product_relation. To handle that, we have added more tweak code for that case. You can do steps as bellow:
-- Download the php file at HERE
and upload replace downloaded file to the file at pub/ub-tool/protected/controllers/Step5Controller.php
-- Once done, you can continue with data migration in the step #5.
Regards,
Mall.

#1

Please login or Register to Submit Answer

Written By

Comments