Error during step 7 update

I received the following error:
 
2022/06/26 05:14:04 [error] [ub_data_migration] CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘54298’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `quote` (`store_id`, `is_active`, `is_virtual`, `is_multi_shipping`, `items_count`, `items_qty`, `orig_order_id`, `store_to_base_rate`, `store_to_quote_rate`, `grand_total`, `base_grand_total`, `customer_group_id`, `customer_note_notify`, `customer_is_guest`, `trigger_recollect`, `is_persistent`, `newsletter_subscribe`, `entity_id`, `created_at`, `updated_at`, `base_currency_code`, `store_currency_code`, `quote_currency_code`, `checkout_method`, `customer_tax_class_id`, `customer_email`, `customer_firstname`, `customer_lastname`, `remote_ip`, `reserved_order_id`, `global_currency_code`, `base_to_global_rate`, `base_to_quote_rate`, `subtotal`, `base_subtotal`, `subtotal_with_discount`, `base_subtotal_with_discount`, `is_changed`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10, :yp11, :yp12, :yp13, :yp14, :yp15, :yp16, :yp17, :yp18, :yp19, :yp20, :yp21, :yp22, :yp23, :yp24, :yp25, :yp26, :yp27, :yp28, :yp29, :yp30, :yp31, :yp32, :yp33, :yp34, :yp35, :yp36, :yp37)
 
Then used:
Delete From salesrule Where rule_id NOT IN (Select m2_id From ub_migrate_map_step_7 where entity_name = ‘salesrule’);
Delete From quote Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_quote where entity_name = ‘sales_flat_quote’ OR entity_name = ‘sales_flat_quote_active’);
Delete From quote_item Where item_id NOT IN (Select m2_id From ub_migrate_map_step_7_quote_item where entity_name = ‘sales_flat_quote_item’);
Delete From quote_address Where address_id NOT IN (Select m2_id From ub_migrate_map_step_7_quote_address where entity_name = ‘sales_flat_quote_address’);
Delete From sales_order Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_order where entity_name = ‘sales_flat_order’);
Delete From sales_order_item Where item_id NOT IN (Select m2_id From ub_migrate_map_step_7_order_item where entity_name = ‘sales_flat_order_item’);
Delete From sales_order_address Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_order_address where entity_name = ‘sales_flat_order_address’);
Delete From sales_invoice Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_invoice where entity_name = ‘sales_flat_invoice’);
Delete From sales_invoice_item Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_invoice_item where entity_name = ‘sales_flat_invoice_item’);
 
Now I use this and get an error:
 
php -f bin/ubdatamigration run --step=7 --mode=update
 
Processing][delta] in step #7: ……………………
[Processing][delta] Step #7 migration completed with 4 record(s) in the ‘salesrule’ table.
………………….
[Processing][delta] Step #7 migration completed with 13 record(s) in the ‘sales_order_status’ table.
…….PHP Error[8]: Trying to get property ‘attributes’ of non-object
in file /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/protected/controllers/Step7Controller.php at line 1740
#0 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/yii-1.1.25/base/CApplication.php(832): CErrorHandler->handle()
#1 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/protected/controllers/Step7Controller.php(1740): CConsoleApplication->handleError()
#2 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/protected/controllers/Step7Controller.php(1631): Step7Controller->_migrateSalesQuote()
#3 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/protected/controllers/Step7Controller.php(310): Step7Controller->_migrateSalesOrders()
#4 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/protected/commands/RunCommand.php(80): Step7Controller->actionRun()
#5 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/protected/commands/RunCommand.php(36): RunCommand->_migrateData()
#6 unknown(0): RunCommand->actionIndex()
#7 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/yii-1.1.25/console/CConsoleCommand.php(178): ReflectionMethod->invokeArgs()
#8 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/yii-1.1.25/console/CConsoleCommandRunner.php(71): RunCommand->run()
#9 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/yii-1.1.25/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#10 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/yii-1.1.25/base/CApplication.php(185): CConsoleApplication->processRequest()
#11 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/yii-1.1.25/yiic.php(33): CConsoleApplication->run()
#12 /chroot/home/a3fc1773/1393f14cae.nxcli.net/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#13 /chroot/home/a3fc1773/1393f14cae.nxcli.net/bin/ubdatamigration(4): require_once()

1 answer

Profile photo of Mall Staff 180840.00 $tone June 27, 2022
Public

Hi there,

[Processing][delta] Step #7 migration completed with 13 record(s) in the ‘sales_order_status’ table.
…….PHP Error[8]: Trying to get property ‘attributes’ of non-object

To solve the issue, please try following these steps:
1. Run the CLI command:

php -f bin/ubdatamigration clean --step=7;

2. Continue with data migration in step #7:

php -f bin/ubdatamigration run --step=7;

Regards,
Mall.

#1

Please login or Register to Submit Answer

Written By

Comments