Delta button not working

 The Delta button of the migration tool is not working. It doesn’t do anything. We suppose that it will update the qty, price, etc. of the products that were already migrated and also add new products from the Magento1 database. But it does nothing.

And, then we tried to re-run the product migration. After re-running the product migration, the new products were added but the old products were not updated. We supposed that it will update the product price, qty, etc. of already migrated products.

So, our main concern is how can we fetch the updated data of already migrated products, sales, customers from the Magento 1 database?

  1. Also, we have unchecked the ‘KEEP ORIGINAL IDs’ checkbox in all the steps.

9 answers

Profile photo of Mall Staff 102600.00 $tone December 27, 2018
Public

Hi there,

So, our main concern is how can we fetch the updated data of already migrated products, sales, customers from the Magento 1 database?

To update migrated products, you need to run delta migration in the step #5 with the Update mode.
As noted in the Readme.html that comes packed with your download package, the --mode=update will also overwrite existing Magento 2 data that has been migrated from Magento 1. 
You could use the following CLI command to run delta migration with the Update mode:

php -f bin/ubdatamigration run --step=5 --mode=update

Regards,
Mall.
 

#1
Profile photo of iconicimprint 30.00 $tone December 27, 2018
Public

We are getting the following error:
 

$ php -f bin/ubdatamigration run --step=5 --mode=update
Processing in step #5……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………..PHP Error[8]: Trying to get property of non-object
in file /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/controllers/Step5Controller.php at line 818
#0 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/controllers/Step5Controller.php(492): Step5Controller->_migrateCatalogProductOptions()
#1 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/controllers/Step5Controller.php(153): Step5Controller->_migrateCatalogProducts()
#2 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/commands/RunCommand.php(58): Step5Controller->actionRun()
#3 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/commands/RunCommand.php(28): RunCommand->_migrateData()
#4 unknown(0): RunCommand->actionIndex()
#5 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#6 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#7 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#8 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#9 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#10 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#11 /Users/kbc/Sites/magento2-iconic2/bin/ubdatamigration(4): require_once()

#2
Profile photo of Mall Staff 102600.00 $tone December 27, 2018
Public

Hi there,

PHP Error[8]: Trying to get property of non-object
in file /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/controllers/Step5Controller.php at line 818

That issue because you have deleted at least one product/product’s options after the first migration with our migration tool.
To solve that issue, let’s do steps below:
+ Run below SQL in your M2’s database:

DELETE FROM ub_migrate_map_step_5 WHERE entity_name = 'catalog_product_entity' AND m2_id NOT IN (Select entity_id From catalog_product_entity);
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);

+ Once done, clean the cache of our migration tool by run command:
rm -rf pub/ub-tool/protected/runtime/cache/
+ And then, you could continue with data migration in the step #5 by run CLI command:
php -f bin/ubdatamigration run --step=5;
Regards,
Mall.

#3
Profile photo of iconicimprint 30.00 $tone December 28, 2018
Public

Thank you very much. It solved the product migration issue.

However, we are getting the following error while trying to migrate customers on update mode via CLI:


$ php -f bin/ubdatamigration run --step=6 --mode=update;
Processing in step #6………….[Processing] Step #6 migration completed with 5 Customer Groups;
Processing in step #6…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….
Status: fail
Message: Mage2CustomerAddressEntity: Street cannot be blank.<br/>Mage2CustomerAddressEntity: Street cannot be blank.<br/>Mage2CustomerAddressEntity: Street cannot be blank.

#4
Profile photo of iconicimprint 30.00 $tone December 28, 2018
Public

Here’s another error while trying to migrate Sales data in update mode via CLI:

$ php -f bin/ubdatamigration run --step=7 --mode=update;
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
Processing in step #7……………………………………………………………………………………………………………………………………………………………………………………………PHP Error[8]: Trying to get property of non-object
in file /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/controllers/Step7Controller.php at line 1412
#0 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/controllers/Step7Controller.php(1310): Step7Controller->_migrateSalesQuote()
#1 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/controllers/Step7Controller.php(246): Step7Controller->_migrateSalesOrders()
#2 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/commands/RunCommand.php(58): Step7Controller->actionRun()
#3 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/commands/RunCommand.php(28): RunCommand->_migrateData()
#4 unknown(0): RunCommand->actionIndex()
#5 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#6 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#7 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#8 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#9 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#10 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#11 /Users/kbc/Sites/magento2-iconic2/bin/ubdatamigration(4): require_once()

#5
Profile photo of Mall Staff 102600.00 $tone December 28, 2018
Public

Hi there,

Status: fail
Message: Mage2CustomerAddressEntity: Street cannot be blank.<br/>Mage2CustomerAddressEntity: Street cannot be blank.<br/>Mage2CustomerAddressEntity: Street cannot be blank.

That issue because your M1’s database has some records which has missed value of ‘street’ attribute.
To handle for that case, let’s try with steps below:
+ Download the PHP file at here
+ And then, upload the downloaded file to the file at path: pub/ub-tool/protected/controllers/Step6Controller.php
+ Once done, continue with data migration in the step #6 by run CLI command:
php -f bin/ubdatamigration run --step=6
And tell me know how it goes.
Regards,
Mall.
 

#6
Profile photo of Mall Staff 102600.00 $tone December 28, 2018
Public

Hi there,

#7……………………………………………………………………………………………………………………………………………………………………………………………PHP Error[8]: Trying to get property of non-object

That because you have deleted some sales data after the first migration. To handle for that, let’s try with steps below:
 
+ Run below SQL in your M2 database:

DELETE FROM ub_migrate_map_step_7 WHERE entity_name = 'salesrule' AND m2_id NOT IN (Select rule_id From salesrule);
DELETE FROM ub_migrate_map_step_7 WHERE entity_name = 'salesrule_coupon' AND m2_id NOT IN (Select coupon_id From salesrule_coupon);
DELETE FROM ub_migrate_map_step_7_order_item WHERE entity_name = 'sales_flat_order_item' AND m2_id NOT IN (Select item_id From sales_order_item);
DELETE FROM ub_migrate_map_step_7_quote WHERE entity_name = 'sales_flat_quote' AND m2_id NOT IN (Select entity_id From quote);
DELETE FROM ub_migrate_map_step_7_quote_item WHERE entity_name = 'sales_flat_quote_item' AND m2_id NOT IN (Select item_id From quote_item);
DELETE FROM ub_migrate_map_step_7_quote_address WHERE entity_name = 'sales_flat_quote_address' AND m2_id NOT IN (Select address_id From quote_address);

+ Clean the cache of our migration tool by run command: rm -rf pub/ub-tool/protected/runtime/cache/
+ Once done, you could continue in the step #7
Regards,
Mall.

#7
Profile photo of iconicimprint 30.00 $tone December 31, 2018
Public

Thanks, Mall. The issues related to customer and sales migration were solved by following your instructions.

We have one more issue with category migration. After migration, we happen to delete all the categories in Magento 2 site. Now, when we again try to migrate the categories, we get the following error:

$ php -f bin/ubdatamigration run --step=4;
Processing in step #4…PHP Error[2]: Creating default object from empty value
in file /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/controllers/Step4Controller.php at line 252
#0 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/controllers/Step4Controller.php(125): Step4Controller->_migrateCatalogCategories()
#1 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/commands/RunCommand.php(58): Step4Controller->actionRun()
#2 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/commands/RunCommand.php(28): RunCommand->_migrateData()
#3 unknown(0): RunCommand->actionIndex()
#4 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#5 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#6 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#7 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#8 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#9 /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#10 /Users/kbc/Sites/magento2-iconic2/bin/ubdatamigration(4): require_once()

#8
Profile photo of Mall Staff 102600.00 $tone December 31, 2018
Public

Hi there,

Processing in step #4…PHP Error[2]: Creating default object from empty value
in file /Users/kbc/Sites/magento2-iconic2/pub/ub-tool/protected/controllers/Step4Controller.php at line 252

You should disable the migrated categories only when you have not finished data migration. To continue with delta migration in step #4, let’s do steps below:
+ Run below SQL in your M2 database:

DELETE FROM ub_migrate_map_step_4 WHERE entity_name = 'catalog_category_entity' AND m2_id NOT IN (Select entity_id From catalog_category_entity);

+ Clean the cache of our migration tool by run command: 
rm -rf pub/ub-tool/protected/runtime/cache/
+ Once done, you could continue.
Regards,
Mall.
 

#9

Please login or Register to Submit Answer

Written By

Comments