Hello,
I am using UB Data migration Pro module to migrate data from M2 to M2. I am doing delta migration with --mode=update so existing product also can be update during delta migration. I am running command php70 bin/ubdatamigration run --step=5 --mode=update but I am getting error PHP Error [8]: Trying to get property of non-object in file in file /home/m2ruffle/m2.ruffledata.com/pub/ub-tool/protected/controllers/Step5Controller.php at line 800…
Please check screenshot for more information about error. Please check and give me solution to fix it ASAP.
http://prntscr.com/kdc59u
http://prntscr.com/kdc59u
Thank You
3 answers
Hi there,
That issue because you have deleted at least one product custom options after the first migration with our tool.
To solve that issue, let’s do steps below:
+ Run below SQLs in your M2 database:
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);
+ Clean the cache of our tool by run command: rm -rf pub/ub-tool/protected/runtime/cache/
+ Once done, you could continue with data migration in the step #5 by run CLI command:
php70 bin/ubdatamigration run --step=5
(Note: Don’t run with update mode at this step)
Regards,
Mall.
Than you for your reply.
This solution worked for that error but now I am getting following error:
PHP Error[2]: Creating default object from empty value in file /home/m2ruffle/m2.ruffledata.com/pub/ub-tool/protected/controllers/Step5Controller.php at line 452
Please check screenshot.https://prnt.sc/ke7eeo
Hi there,
Please check screenshot.https://prnt.sc/ke7eeo
That issue because you have deleted at least one product after the first migration. To solve that issue, lets do steps below:
+ Run below SQL in your M2 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);
+ Clean the cache of our tool by run command: rm -rf pub/ub-tool/protected/runtime/cache/
+ And then, you could continue with data migration in the step #5
Regards,
Mall.