Hello
I made full migration 2 weeks ago, and now I try to make delta migration to steps 5-8. But delta fails errors in thep 7 and 8:
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘setting_data’ at row 1. The SQL statement executed was: UPDATE `ub_migrate_step` SET `id`=:yp0, `title`=:yp1, `code`=:yp2, `status`=:yp3, `setting_data`=:yp4, `start_at`=:yp5, `end_at`=:yp6, `descriptions`=:yp7, `sorder`=:yp8 WHERE `ub_migrate_step`.`id`=7
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘setting_data’ at row 1. The SQL statement executed was: UPDATE `ub_migrate_step` SET `id`=:yp0, `title`=:yp1, `code`=:yp2, `status`=:yp3, `setting_data`=:yp4, `start_at`=:yp5, `end_at`=:yp6, `descriptions`=:yp7, `sorder`=:yp8 WHERE `ub_migrate_step`.`id`=8
After that I change “setting_data” field type to long_blob. I run delta migration again, but it does not made anything. How I can run delta migrate again for new products, orders and etc from steps 5 to 8 which are new in last two weeks ??
Regards,
Ari
15 answers
Hi there,
After that I change “setting_data” field type to long_blob.
Did you save the configuration in step #7 successfully after that change?
If yes, to delta migration in step #7, you simply run the CLI command:
php -f bin/ubdatamigration run --step=7 --mode=update;
And you can do the same way on other steps which you want to delta migration.
Regards,
Mall.
Hello
Here is the results:
STEP 5 -> error:
php bin/ubdatamigration run --step=5 --limit=2 --mode=update
[Processing][delta] in step #5: ……………………………………………………………………………………………………………………………………………………………………………………..
[Processing][delta] Step #5 migration completed with 2 record(s) in the ‘catalog_product_entity’ table.
PHP Error[2]: Creating default object from empty value
in file /var/www/magento2/pub/ub-tool/protected/controllers/Step5Controller.php at line 657
#0 /var/www/magento2/pub/ub-tool/protected/controllers/Step5Controller.php(187): Step5Controller->_migrateCatalogProducts()
#1 /var/www/magento2/pub/ub-tool/protected/commands/RunCommand.php(80): Step5Controller->actionRun()
#2 /var/www/magento2/pub/ub-tool/protected/commands/RunCommand.php(36): RunCommand->_migrateData()
#3 unknown(0): RunCommand->actionIndex()
#4 /var/www/magento2/pub/ub-tool/yii-1.1.22/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#5 /var/www/magento2/pub/ub-tool/yii-1.1.22/console/CConsoleCommandRunner.php(71): RunCommand->run()
#6 /var/www/magento2/pub/ub-tool/yii-1.1.22/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#7 /var/www/magento2/pub/ub-tool/yii-1.1.22/base/CApplication.php(185): CConsoleApplication->processRequest()
#8 /var/www/magento2/pub/ub-tool/yii-1.1.22/yiic.php(33): CConsoleApplication->run()
#9 /var/www/magento2/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#10 /var/www/magento2/bin/ubdatamigration(4): require_once()
STEP 6 -> working, import new customers
STEP 7 -> does not import new orders
Regards, Ari
Hi there,
[Processing][delta] Step #5 migration completed with 2 record(s) in the ‘catalog_product_entity’ table.
PHP Error[2]: Creating default object from empty value
You can solve the issue by the following these steps:
1. Run CLI command:
php -f bin/ubdatamigration clean --step=5;
2. Continue with the delta migration in step #5 by running CLI command:
php -f bin/ubdatamigration run --step=5;
STEP 7 -> does not import new orders
How did you run the delta migration in step #7? Please try again by running the following CLI command:
php -f bin/ubdatamigration run --step=7 --mode=update;
Regards,
Mall.
Hello
I run step 5 like that, but I lost all changes ( url and descriptions) which I have done last week. So I run it like that:
php -f bin/ubdatamigration clean --step=5;
php -f bin/ubdatamigration run --step=5 --startDate=’2021-11-14′ --endDate=’2021-12-08′
Now it is working.
About step 7, it does not work. I run like this:
php -f bin/ubdatamigration run --step=7 --mode=update --startDate=’2021-11-14′ --endDate=’2021-12-08′
And i got this error:
PHP Error[8]: Trying to get property ‘attributes’ of non-object
in file /var/www/magento2/pub/ub-tool/protected/controllers/Step7Controller.php at line 2237
#0 /var/www/magento2/pub/ub-tool/protected/controllers/Step7Controller.php(1795): Step7Controller->_migrateSalesQuoteAddress()
#1 /var/www/magento2/pub/ub-tool/protected/controllers/Step7Controller.php(1631): Step7Controller->_migrateSalesQuote()
#2 /var/www/magento2/pub/ub-tool/protected/controllers/Step7Controller.php(310): Step7Controller->_migrateSalesOrders()
#3 /var/www/magento2/pub/ub-tool/protected/commands/RunCommand.php(80): Step7Controller->actionRun()
#4 /var/www/magento2/pub/ub-tool/protected/commands/RunCommand.php(36): RunCommand->_migrateData()
#5 unknown(0): RunCommand->actionIndex()
#6 /var/www/magento2/pub/ub-tool/yii-1.1.22/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#7 /var/www/magento2/pub/ub-tool/yii-1.1.22/console/CConsoleCommandRunner.php(71): RunCommand->run()
#8 /var/www/magento2/pub/ub-tool/yii-1.1.22/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#9 /var/www/magento2/pub/ub-tool/yii-1.1.22/base/CApplication.php(185): CConsoleApplication->processRequest()
#10 /var/www/magento2/pub/ub-tool/yii-1.1.22/yiic.php(33): CConsoleApplication->run()
#11 /var/www/magento2/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#12 /var/www/magento2/bin/ubdatamigration(4): require_once()
What I can do for this error ?
Ari
Hi there,
PHP Error[8]: Trying to get property ‘attributes’ of non-object…
To solve that issue you can try with steps as the following:
1. Run the CLI command:
php -f bin/ubdatamigration clean --step=7;
2. And then, you continue with delta migration in step #7:
php -f bin/ubdatamigration run --step=7;
Regards,
Mall.
It start working after running
php -f bin/ubdatamigration clean --step=7;
And
php -f bin/ubdatamigration run --step=7 --mode=update --startDate='2021-11-15'
It does not work without --mode=update option.
Hi,
It does not work without --mode=update option.
Yes, you can continue with the ‘update’ mode in step #7
Please contact me if you need further assistance.
Regards,
Mall.
Hello
I made one new product and run step 5 delta. In the log show that product is imported, but it does not come admin side. Here is the log:
[Processing][run] in step #5: ……………………………………………………………………………………………………………………
[Processing][run] Step #5 migration completed with 1 record(s) in the ‘catalog_product_entity’ table.
Step #5 migration completed successfully
Total Data Migrated: 100%
I check database and last imported product is three days old. There is no new entries in the table “catalog_product_entity”. How to fix this ? New products are not written the database.
Ari
Hi there,
[Processing][run] Step #5 migration completed with 1 record(s) in the ‘catalog_product_entity’ table.
Step #5 migration completed successfully
Total Data Migrated: 100%
I check database and last imported product is three days old. There is no new entries in the table “catalog_product_entity”. How to fix this ? New products are not written the database.
That is certainly strange. Can you please recheck the database configuration in the config file of our module at this path:
pub/ub-tool/protected/config/db.php
and make sure that the M2 database credentials are the same as the current M2 database credentials of your M2 instance.
Regards,
Mall.
Yes it is correct. Same happen for orders, the last order is from wednesday. But the customer accounts I can import, all of them are received to M2 side.
Hi there,
Yes it is correct. Same happen for orders, the last order is from wednesday.
Very strange indeed. Can you please try again to delta migration in step #5 and step #7 by running the following CLI commands:
php -f bin/ubdatamigration run --step=5 --mode=update;
Once done, you can run delta migration in step #7:
php -f bin/ubdatamigration run --step=7 --mode=update;
Then please check for the issue that you mentioned again and let me know how it goes.
Regards,
Mall.
Hi
I can’t run full update, because we have done lot of changes to products. But I can try it with startDate option.
Ari
About startDate option, is it working with step 5 ?
How I can be sure that it does not overwrite our products changes ?
Is there any option that I see which products it is updating ?
Hi there,
But I can try it with startDate option.
Yes, please try with that option at your end.
About startDate option, is it working with step 5 ?
Yes.
How I can be sure that it does not overwrite our products changes ?
You need to make sure that you don’t change the information of the migrated products in M2 which are related to M1 products in the date ranges you set in the CLI command.
Regards,
Mall.
Hi
Now it is working, I will test tomorrow again. Thanks !
Ari