A lot of error messages migrating sales data

Hi, I received a lot of error messages while migrating sales data. Here’s a portion of them: (I cut them because there were too many)
Can you provide the fix? Thanks.
 
Mage2SalesOrder: Base Grand Total is too long (maximum is 12 characters).
-- Base Subtotal is too long (maximum is 12 characters).
-- Grand Total is too long (maximum is 12 characters).
-- Subtotal is too long (maximum is 12 characters).
-- Base Subtotal Incl Tax is too long (maximum is 12 characters).
-- Base Total Due is too long (maximum is 12 characters).
-- Subtotal Incl Tax is too long (maximum is 12 characters).
-- Total Due is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Grand Total is too long (maximum is 12 characters).
-- Base Subtotal is too long (maximum is 12 characters).
-- Base Subtotal Invoiced is too long (maximum is 12 characters).
-- Base Total Invoiced is too long (maximum is 12 characters).
-- Base Total Invoiced Cost is too long (maximum is 12 characters).
-- Base Total Paid is too long (maximum is 12 characters).
-- Grand Total is too long (maximum is 12 characters).
-- Subtotal is too long (maximum is 12 characters).
-- Subtotal Invoiced is too long (maximum is 12 characters).
-- Total Invoiced is too long (maximum is 12 characters).
-- Total Paid is too long (maximum is 12 characters).
-- Base Subtotal Incl Tax is too long (maximum is 12 characters).
-- Subtotal Incl Tax is too long (maximum is 12 characters).
Mage2SalesOrder: Base Grand Total is too long (maximum is 12 characters).
-- Base Subtotal is too long (maximum is 12 characters).
-- Base Subtotal Invoiced is too long (maximum is 12 characters).
-- Base Total Invoiced is too long (maximum is 12 characters).
-- Base Total Invoiced Cost is too long (maximum is 12 characters).
-- Base Total Paid is too long (maximum is 12 characters).
-- Grand Total is too long (maximum is 12 characters).
-- Subtotal is too long (maximum is 12 characters).
-- Subtotal Invoiced is too long (maximum is 12 characters).
-- Total Invoiced is too long (maximum is 12 characters).
-- Total Paid is too long (maximum is 12 characters).
-- Base Subtotal Incl Tax is too long (maximum is 12 characters).
-- Subtotal Incl Tax is too long (maximum is 12 characters).
Mage2SalesOrder: Base Grand Total is too long (maximum is 12 characters).
-- Base Subtotal is too long (maximum is 12 characters).
-- Base Subtotal Invoiced is too long (maximum is 12 characters).
-- Base Total Invoiced is too long (maximum is 12 characters).
-- Base Total Invoiced Cost is too long (maximum is 12 characters).
-- Base Total Paid is too long (maximum is 12 characters).
-- Grand Total is too long (maximum is 12 characters).
-- Subtotal is too long (maximum is 12 characters).
-- Subtotal Invoiced is too long (maximum is 12 characters).
-- Total Invoiced is too long (maximum is 12 characters).
-- Total Paid is too long (maximum is 12 characters).
-- Base Subtotal Incl Tax is too long (maximum is 12 characters).
-- Subtotal Incl Tax is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Grand Total is too long (maximum is 12 characters).
-- Base Shipping Amount is too long (maximum is 12 characters).
-- Base Shipping Canceled is too long (maximum is 12 characters).
-- Base Total Canceled is too long (maximum is 12 characters).
-- Grand Total is too long (maximum is 12 characters).
-- Shipping Amount is too long (maximum is 12 characters).
-- Shipping Canceled is too long (maximum is 12 characters).
-- Total Canceled is too long (maximum is 12 characters).
-- Base Total Due is too long (maximum is 12 characters).
-- Total Due is too long (maximum is 12 characters).
-- Shipping Incl Tax is too long (maximum is 12 characters).
-- Base Shipping Incl Tax is too long (maximum is 12 characters).
Mage2SalesOrder: Base Grand Total is too long (maximum is 12 characters).
-- Base Total Invoiced is too long (maximum is 12 characters).
-- Base Total Paid is too long (maximum is 12 characters).
-- Grand Total is too long (maximum is 12 characters).
-- Total Invoiced is too long (maximum is 12 characters).
-- Total Paid is too long (maximum is 12 characters).
Mage2SalesOrder: Base Grand Total is too long (maximum is 12 characters).
-- Base Shipping Amount is too long (maximum is 12 characters).
-- Base Shipping Canceled is too long (maximum is 12 characters).
-- Base Total Canceled is too long (maximum is 12 characters).
-- Grand Total is too long (maximum is 12 characters).
-- Shipping Amount is too long (maximum is 12 characters).
-- Shipping Canceled is too long (maximum is 12 characters).
-- Total Canceled is too long (maximum is 12 characters).
-- Base Total Due is too long (maximum is 12 characters).
-- Total Due is too long (maximum is 12 characters).
-- Shipping Incl Tax is too long (maximum is 12 characters).
-- Base Shipping Incl Tax is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Discount Amount is too long (maximum is 12 characters).
-- Discount Amount is too long (maximum is 12 characters).
Mage2SalesOrder: Base Grand Total is too long (maximum is 12 characters).
-- Base Shipping Amount is too long (maximum is 12 characters).
-- Base Shipping Canceled is too long (maximum is 12 characters).
-- Base Total Canceled is too long (maximum is 12 characters).
-- Grand Total is too long (maximum is 12 characters).
-- Shipping Amount is too long (maximum is 12 characters).
-- Shipping Canceled is too long (maximum is 12 characters).
-- Total Canceled is too long (maximum is 12 characters).
-- Base Total Due is too long (maximum is 12 characters).
-- Total Due is too long (maximum is 12 characters).
-- Shipping Incl Tax is too long (maximum is 12 characters).
-- Base Shipping Incl Tax is too long (maximum is 12 characters).
Mage2SalesOrder: Base Grand Total is too long (maximum is 12 characters).
-- Base Shipping Amount is too long (maximum is 12 characters).
-- Base Shipping Canceled is too long (maximum is 12 characters).
-- Base Total Canceled is too long (maximum is 12 characters).
-- Grand Total is too long (maximum is 12 characters).
-- Shipping Amount is too long (maximum is 12 characters).
-- Shipping Canceled is too long (maximum is 12 characters).
-- Total Canceled is too long (maximum is 12 characters).
-- Base Total Due is too long (maximum is 12 characters).
-- Total Due is too long (maximum is 12 characters).
-- Shipping Incl Tax is too long (maximum is 12 characters).
-- Base Shipping Incl Tax is too long (maximum is 12 characters).
Mage2SalesOrderAggregatedCreated: Total Income Amount is too long (maximum is 12 characters).
-- Total Revenue Amount is too long (maximum is 12 characters).
-- Total Invoiced Amount is too long (maximum is 12 characters).
-- Total Paid Amount is too long (maximum is 12 characters).
Mage2SalesOrderAggregatedCreated: Total Income Amount is too long (maximum is 12 characters).

 

6 answers

Profile photo of Mall Staff 184060.00 $tone July 12, 2016
Public

Hi deche,
That because your Magento 1 data has a lot of bad data with new rules of Magento 2 databases.
Le’ts tell me what version of this tool and versions of Magento 1 and Magento2 in your working?
Regards,
Mall.
 

#1
Profile photo of Mall Staff 184060.00 $tone July 12, 2016
Public

Hi deche,
Let’s try open the file at path: pub/ub-tool/protected/models/mage2/Mage2SalesOrder.php
and find to the code line #169:

array('base_discount_amount, base_discount_canceled, base_discount_invoiced, base_discount_refunded, base_grand_total, base_shipping_amount, base_shipping_canceled, base_shipping_invoiced, base_shipping_refunded, base_shipping_tax_amount, base_shipping_tax_refunded, base_subtotal, base_subtotal_canceled, base_subtotal_invoiced, base_subtotal_refunded, base_tax_amount, base_tax_canceled, base_tax_invoiced, base_tax_refunded, base_to_global_rate, base_to_order_rate, base_total_canceled, base_total_invoiced, base_total_invoiced_cost, base_total_offline_refunded, base_total_online_refunded, base_total_paid, base_total_qty_ordered, base_total_refunded, discount_amount, discount_canceled, discount_invoiced, discount_refunded, grand_total, shipping_amount, shipping_canceled, shipping_invoiced, shipping_refunded, shipping_tax_amount, shipping_tax_refunded, store_to_base_rate, store_to_order_rate, subtotal, subtotal_canceled, subtotal_invoiced, subtotal_refunded, tax_amount, tax_canceled, tax_invoiced, tax_refunded, total_canceled, total_invoiced, total_offline_refunded, total_online_refunded, total_paid, total_qty_ordered, total_refunded, adjustment_negative, adjustment_positive, base_adjustment_negative, base_adjustment_positive, base_shipping_discount_amount, base_subtotal_incl_tax, base_total_due, payment_authorization_amount, shipping_discount_amount, subtotal_incl_tax, total_due, weight, discount_tax_compensation_amount, base_discount_tax_compensation_amount, shipping_discount_tax_compensation_amount, base_shipping_discount_tax_compensation_amnt, discount_tax_compensation_invoiced, base_discount_tax_compensation_invoiced, discount_tax_compensation_refunded, base_discount_tax_compensation_refunded, shipping_incl_tax, base_shipping_incl_tax', 'length', 'max'=>12),

and replace it by code line: ( try comment out the validate rules in Magento 2 database)

//array('base_discount_amount, base_discount_canceled, base_discount_invoiced, base_discount_refunded, base_grand_total, base_shipping_amount, base_shipping_canceled, base_shipping_invoiced, base_shipping_refunded, base_shipping_tax_amount, base_shipping_tax_refunded, base_subtotal, base_subtotal_canceled, base_subtotal_invoiced, base_subtotal_refunded, base_tax_amount, base_tax_canceled, base_tax_invoiced, base_tax_refunded, base_to_global_rate, base_to_order_rate, base_total_canceled, base_total_invoiced, base_total_invoiced_cost, base_total_offline_refunded, base_total_online_refunded, base_total_paid, base_total_qty_ordered, base_total_refunded, discount_amount, discount_canceled, discount_invoiced, discount_refunded, grand_total, shipping_amount, shipping_canceled, shipping_invoiced, shipping_refunded, shipping_tax_amount, shipping_tax_refunded, store_to_base_rate, store_to_order_rate, subtotal, subtotal_canceled, subtotal_invoiced, subtotal_refunded, tax_amount, tax_canceled, tax_invoiced, tax_refunded, total_canceled, total_invoiced, total_offline_refunded, total_online_refunded, total_paid, total_qty_ordered, total_refunded, adjustment_negative, adjustment_positive, base_adjustment_negative, base_adjustment_positive, base_shipping_discount_amount, base_subtotal_incl_tax, base_total_due, payment_authorization_amount, shipping_discount_amount, subtotal_incl_tax, total_due, weight, discount_tax_compensation_amount, base_discount_tax_compensation_amount, shipping_discount_tax_compensation_amount, base_shipping_discount_tax_compensation_amnt, discount_tax_compensation_invoiced, base_discount_tax_compensation_invoiced, discount_tax_compensation_refunded, base_discount_tax_compensation_refunded, shipping_incl_tax, base_shipping_incl_tax', 'length', 'max'=>12),

And reset the step #7 and restart the data migration in this step.
And let’s me know how it goes.
Regards,
Mall.

#3
Profile photo of deche 10.00 $tone July 15, 2016
Public

Hi Mall,
 
I decided to upgrade to UB Data Migration Pro v2.0.5 (instead of v2.0.4) and a lot of the error messages have disappeared except this one: “Mage2SalesInvoicedAggregatedOrder: Invoiced is too long (maximum is 12 characters).
-- Invoiced Captured is too long (maximum is 12 characters).”
So the solution is still the same? I comment out the validation line?

#4
Profile photo of Admin Staff -30640.00 $tone July 15, 2016
Public

Hi Deche, 
Please find our answers below: 
Q. So the solution is still the same? I comment out the validation line?
A. Yes, this is specific workaround for your case only, to migrate non-standard data from your M1 to M2. It’s not recommended for other cases, so we do not apply this tweak to our default Pro version.
Q. The message about maximum 12 characters
A. It refers to a change in Magento 2 database scheme. For instance, the Mage2SalesOrder field in your Magento 1.x exceeds default max 12 characters allowed in Magento 2. So far, we apply a tweak is to trim the last characters. Many M2 sites find this solution a good fit for them.
Hope that helps. 
Sincerely,
An Nguyen

#5
Profile photo of Admin Staff -30640.00 $tone July 15, 2016
Public

Hi Deche, 
Just want to add a little bit clarification about the trimmed characters. When importing your data to Magento 2, if any field has the number of characters that exceed max length defined by Magento 2, then extra characters will be trimmed automatically before such field is imported into MySQL.
Sincerely,
An Nguyen

#6

Please login or Register to Submit Answer

Written By

Comments