Salesd Order Migration Won't Complete

Sales order migration has been running for 2 days and hasn’t completed. Only about half of the orders had transferred and it appears that the migration was stuck. I tried resetting the migration process for the sales orders but that did not fix the issue. Thank you in advance for your help.

4 answers

Profile photo of Mall Staff 184060.00 $tone February 21, 2018
Public

Hi there,

Fatal error: Call to undefined method stdClass::save() in /home/tactic95/public_html/pub/ub-tool/protected/controllers/Step7Controller.php on line 2663

It seem you have deleted some sales orders after the first migration with our tool. To solve that issue you could try with steps as followings:
-- Run bellow SQL statements in your Magento2 database:

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_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 tool by run command: rm -rf pub/ub-tool/protected/runtime/cache/
-- And then, you could continue with delta migration in the step #7 by run cli command as you did.
And tell me known how it goes.
Regards,
Mall.
 

#
Profile photo of Mall Staff 184060.00 $tone February 19, 2018
Public

Hi there,

Sales order migration has been running for 2 days and hasn’t completed. Only about half of the orders had transferred and it appears that the migration was stuck. 

Seem the sales data section has some records with bad data. Let’s try run data migration in the step #7 of our tool by run cli command as followings:
php -f bin/ubdatamigration run --step=7
And tell me know how it goes. I will check further and help you out.
Regards,
Mall.

#1
Profile photo of da.mienb 30.00 $tone February 19, 2018
Public

 Hi Mall,
Thanks for the reply. Below is the output.

 Fatal error: Call to undefined method stdClass::save() in /home/tactic95/public_html/pub/ub-tool/protected/controllers/Step7Controller.php on line 2663

Below is the codeblock from the file that seems to be the issue.

//save/update
if (!$model2->save()) {
$this->errors[] = get_class($model2) . ": " . UBMigrate::getStringErrors($model2->getErrors());
} else {
if (is_null($m2Id)) {
UBMigrate::log([
'entity_name' => $model->tableName(),
'm1_id' => $model->item_id,
'm2_id' => $model2->item_id,
'm2_model_class' => get_class($model2),
'm2_key_field' => 'item_id',
'can_reset' => UBMigrate::RESET_YES,
'step_index' => "7OrderItem"
]);
}
}
#2

Please login or Register to Submit Answer

Written By

Comments