Hi there,
My data migration from 1.7.x is chrashing on step 7 constantly, I’ve already reseted and tried to check different options in step 7 settings but it keeps saying:
2018/07/24 14:31:52 [error] [ub_data_migration] Mage2SalesOrder: Updated At cannot be blank.
Mage2SalesOrder: Updated At cannot be blank.
Mage2SalesOrder: Updated At cannot be blank.
Mage2SalesOrder: Updated At cannot be blank.
Mage2SalesOrder: Updated At cannot be blank.
Mage2SalesOrder: Updated At cannot be blank.
thanks in advance for your help
Regards
Lathion J.B
4 answers
Hi Lathion J.B,
Mage2SalesShipmentGrid: Order Increment Id cannot be blank.
That is another bad data issue with some records in the table ‘sales_flat_shipment_grid’. Some records had missing required values on the filed named ‘order_increment_id’.
Thus, in order to continue data migration in the step #7, you should delete these records in the table ‘sales_flat_shipment_grid’ by running the below SQL statement:
Delete From sales_flat_shipment_grid Where order_increment_id IS NULL or order_increment_id = '';
Alternatively, if you want to keep these records in the table ‘sales_flat_shipment_grid’, you can try with these steps:
+ Open the php file at: pub/ub-tool/protected/controllers/Step7Controller.php
and find the line:
if (empty(trim($model2->customer_name))) {
$model2->customer_name = 'Unknown';
}
and replace it with:
if (empty(trim($model2->customer_name))) {
$model2->customer_name = 'Unknown';
}
if (empty(trim($model2->order_increment_id))) {
$model2->order_increment_id = 'Unknown';
}
+ Once done, you can continue with data migration in the step #7 of our tool.
Regards,
Mall.
Hi there,
Mage2SalesOrder: Updated At cannot be blank.
That issue because your M1 database has some records which has bad data in the value of the sales_flat_order.updated_at field in sales data section.
To handle for that case, you could try with steps below:
+ Open the php file at path: pub/ub-tool/protected/controllers/Step7Controller.php
and find to the code line:
if (!$salesOrder2->save()) {
and replace it by code lines:
if ($salesOrder2->updated_at === '0000-00-00 00:00:00' || empty($salesOrder2->updated_at)) {
$salesOrder2->updated_at = date("Y-m-d H:i:s");
}
if (!$salesOrder2->save()) {
+ And find to the code line:
if ($salesOrder2->update()) {
and replace it by code lines:
if ($salesOrder2->updated_at === '0000-00-00 00:00:00' || empty($salesOrder2->updated_at)) {
$salesOrder2->updated_at = date("Y-m-d H:i:s");
}
if ($salesOrder2->update()) {
+ Once done, you could continue with data migration in the step #7 of our tool.
Regards,
Mall.
Hi there,
Thank you very much for the trick it worked. But now i’ve got a new error saying
Mage2SalesShipmentGrid: Order Increment Id cannot be blank.
Regards
Lathion J.B
Hi there,
Thank you very much for the help you’ve provided.
Regards
Lathion J.B
This question is now closed