Error in delta migration step 5

Hello,
 
During delta migration step 5 I get the following error:
.PHP Error[2]: Invalid argument supplied for foreach()
in file /home/jukeboxs/public_html/pub/ub-tool/protected/controllers/Step5Controller.php at line 797
#0 /home/jukeboxs/public_html/pub/ub-tool/protected/controllers/Step5Controller.php(484): Step5Controller->_migrateCatalogProductOptions()
#1 /home/jukeboxs/public_html/pub/ub-tool/protected/controllers/Step5Controller.php(146): Step5Controller->_migrateCatalogProducts()
#2 /home/jukeboxs/public_html/pub/ub-tool/protected/commands/RunCommand.php(58): Step5Controller->actionRun()
#3 /home/jukeboxs/public_html/pub/ub-tool/protected/commands/RunCommand.php(28): RunCommand->_migrateData()
#4 unknown(0): RunCommand->actionIndex()
#5 /home/jukeboxs/public_html/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#6 /home/jukeboxs/public_html/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#7 /home/jukeboxs/public_html/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#8 /home/jukeboxs/public_html/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#9 /home/jukeboxs/public_html/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#10 /home/jukeboxs/public_html/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#11 /home/jukeboxs/public_html/bin/ubdatamigration(4): require_once()

3 answers

Profile photo of Mall Staff 184060.00 $tone September 22, 2017
Public

Hi there,

During delta migration step 5 I get the following error:
.PHP Error[2]: Invalid argument supplied for foreach()
in file /home/jukeboxs/public_html/pub/ub-tool/protected/controllers/Step5Controller.php at line 797
#0 /home/jukeboxs/public_html/pub/ub-tool/protected/controllers/Step5Controller.php(484): Step5Controller->_migrateCatalogProductOptions()

Let’s provide me the admin credentials, ssh credentials and web root path of your Magento2 instance now. I will check further and reply you more about that.
Regards,
Mall.

#1
Profile photo of Mall Staff 184060.00 $tone September 25, 2017
Public

Hi there,

Processing in step #5………………………………………………………………………………………………………………………..PHP Error[2]: Invalid argument supplied for foreach()
in file /home/jukeboxs/public_html/pub/ub-tool/protected/controllers/Step5Controller.php at line 797

I have checked your working and see the root issue because you have deleted some migrated product options in back-end of  your site after the first migration with our tool. To solve that issue i did steps as followings:
1 -- Run followings SQLs statement in your Magento2’s database:
    -- http://i.prntscr.com/3HWs6mTFTgasziJQwEO9gQ.png
    -- http://i.prntscr.com/oTjpUQ88TjOm5fkKCDzRxg.png
   -- http://i.prntscr.com/YjvfhNufRxijP_fC02GvYw.png

DELETE FROM ub_migrate_map_step_5_product_option WHERE entity_name = 'catalog_product_option' AND m2_id NOT IN (Select option_id From catalog_product_option);
DELETE FROM ub_migrate_map_step_5_product_option WHERE entity_name = 'catalog_product_option_type_value' AND m2_id NOT IN (Select option_type_id From catalog_product_option_type_value);
DELETE FROM ub_migrate_map_step_5_product_option WHERE entity_name = 'catalog_product_option_type_price' AND m2_id NOT IN (Select option_type_price_id From catalog_product_option_type_price);

-- 2 Once done, clean the cache of our tool by run cli command: rm -rf pub/ub-tool/protected/runtime/cache/
And then, you can continue with delta migration in the step #5. I have run continue for testing:
http://i.prntscr.com/b9akYhx7TVaYK3UXZ2Cakg.png
Regards,
Mall.

#3

Please login or Register to Submit Answer

Written By

Comments