Migration Error step 7

 I am getting this error on step 7
 
https://cl.ly/69d72618264d (settings)
CDbCommand failed to execute the SQL statement: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘store_name’ at row 1. The SQL statement executed was: INSERT INTO `sales_order` (`total_item_count`, `paypal_ipn_customer_notified`, `state`, `status`, `coupon_code`, `protect_code`, `shipping_description`, `is_virtual`, `store_id`, `customer_id`, `base_discount_amount`, `base_grand_total`, `base_shipping_amount`, `base_shipping_tax_amount`, `base_subtotal`, `base_tax_amount`, `base_to_global_rate`, `base_to_order_rate`, `discount_amount`, `grand_total`, `shipping_amount`, `shipping_tax_amount`, `store_to_base_rate`, `store_to_order_rate`, `subtotal`, `tax_amount`, `total_qty_ordered`, `customer_is_guest`, `customer_note_notify`, `billing_address_id`, `customer_group_id`, `quote_id`, `shipping_address_id`, `base_shipping_discount_amount`, `base_subtotal_incl_tax`, `shipping_discount_amount`, `subtotal_incl_tax`, `weight`, `increment_id`, `applied_rule_ids`, `base_currency_code`, `customer_email`, `customer_firstname`, `customer_lastname`, `discount_description`, `global_currency_code`, `order_currency_code`, `shipping_method`, `store_currency_code`, `store_name`, `created_at`, `updated_at`, `discount_tax_compensation_amount`, `base_discount_tax_compensation_amount`, `shipping_discount_tax_compensation_amount`, `base_shipping_discount_tax_compensation_amnt`, `shipping_incl_tax`, `base_shipping_incl_tax`, `coupon_rule_name`) 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, :yp38, :yp39, :yp40, :yp41, :yp42, :yp43, :yp44, :yp45, :yp46, :yp47, :yp48, :yp49, :yp50, :yp51, :yp52, :yp53, :yp54, :yp55, :yp56, :yp57, :yp58)

25 answers

Profile photo of Mall Staff 184060.00 $tone October 30, 2019
Public

Hi there,

CDbCommand failed to execute the SQL statement: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘store_name’ at row 1. The SQL statement executed was: INSERT INTO sales_order

That issue occurred because your M1 database has at least one data record which has the bad data in the value of ‘store_name’ field in the table ‘sales_flat_order’.
The allowed max length of ‘store_name’ is 255 characters: https://prnt.sc/ppx1k5

Our module already handles that bad data case in the latest Pro version 3.2.2. Can you upgrade to this latest Pro ver.3.2.2?

After upgrading, you can continue with the data migration in step #7 by running this command:
php -f bin/ubdatamigration run --step=7

Regards,
Mall.

#1
Profile photo of Mall Staff 184060.00 $tone October 30, 2019
Public

Hi there,

UB Data Migration Pro (CE) — 3.2.2

So, the issue you mentioned is strange. Please provide me information of your instance:

  • Admin credentials of your M2 site
  • SSH credentials of your M2 site
  • Let me know the path to your M2 folder

I will help to check further and help you out.
 
PS. Please mark your reply private, or simply switch this ticket to the private mode, then it’s safe to share your site info here. Only you and our technical team can access.
Regards,
Mall.

#3
Profile photo of Mall Staff 184060.00 $tone October 30, 2019
Public

Hi there,
I have checked your instance and saw the root cause of the issue you mentioned as follows:
M2.3.3 increases the allowed max length in the value of sales_order.store_name field: https://prnt.sc/ppx1k5

Thus we added additional tweak code in our Pro ver.3.2.2 for compatibility with that change.
However, your instance used M2.3.2 with the max length allowed in the value of sales_order.store_name is 32 characters: https://prnt.sc/pq242l and this is the root cause of the issue you mentioned in step #7.

Can you upgrade your M2 instance to M2.3.3 now?
 
You should consider to upgrade to M2.3.3 to get new features and fixes for a lot of Magento’s bugs. If you still want to continue with M2.3.2, please let me know, I will add more tweak code in our module to help you continue (if you choose to).
Regards,
Mall.
 
 

#5
Profile photo of ubdev Staff 98150.00 $tone October 30, 2019
Public

Hi there,
Please move forward with the upgrade option. 
Once upgrading is completed, you can continue with the data migration in step #7 by running this command:
php -f bin/ubdatamigration run --step=7
If you come across any issue during the process, please let us know the details of issue here. We will follow up further with you. 
PS. We can not provide instant response due to our daily high workload, however we will try to get back to you as soon as possible.
Regards,
Ubertheme team

#7
Profile photo of Mall Staff 184060.00 $tone October 31, 2019
Public

Hi there,

When viewing products a get the following error — https://cl.ly/3480275cc8a4

Have you reindexed data after migrating? Please reindex data and re-compile your M2 site once again by running the following commands:
php -f bin/magento setup:upgrade
php -f bin/magento setup:di:compile
php -f bin/magento indexer:reindex
php -f bin/magento cache:clean

  1. default catalog migrated  
  2. https://cl.ly/faa4045e50f1

That is normal. The root category named ‘Default Category Migrated’ was migrated by our migration tool from your M1’s database. You can assign this root category to the default Store of the current default website in Stores management in your M2 back-end. Then, you need to reindex data and clean M2 cache to apply this change. And you should see your migrated categories and products available in your M2’s frontend.

Regards,
Mall.
 
 

#11
Profile photo of ubdev Staff 98150.00 $tone October 31, 2019
Public

Hi there, 

unable to see the products on the public side. Even by searching. 

I wonder if you have completed reindex data successfully, as noted in our reply #11? Also please check your product data stock info as well, to see if out of stock products are in place. 

I am missing a large number of customers.
1. M1 has close to 30,000 customers
2. M2 is only showing 7373

Please follow the workaround we mentioned in this ticket, then check this issue again. 

Regards,
Ubertheme team
 

#13
Profile photo of jimpontoon 190.00 $tone October 31, 2019
Public

Products:
I did the items in step 11 (ran through that 2 times)
I also was attempting to edit a product (and got an interesting error on advanced pricing) -- it would not let me save any products I edit with the following error:
The stock item was unable to be saved. Please try again.
In addition, it is asking information regarding gift cards (advanced pricing -- I have not seen that before)
Video of the error and product with stock

 

#14
Profile photo of ubdev Staff 98150.00 $tone October 31, 2019
Public

Hi there,

The stock item was unable to be saved. Please try again.

Please navigate to your M2 store management, open & re-save each migrated website, store, store view. Once done, check the issue once again. 
Regards,
Ubertheme team

#15
Profile photo of Mall Staff 184060.00 $tone October 31, 2019
Public

Hi there,

In addition, it is asking information regarding gift cards (advanced pricing — I have not seen that before)

Those fields aren’t Magento’s core fields. It seems they relate to a third-party extension you use in your M2 site. And those fields have required values, and you must fill the values for those fields when saving migrated product is normal.
https://prnt.sc/pqg2ii

Please do all steps as our reply #5 first. Once done, please check the saving function on migrated product again.
 
Regards,
Mall.

#17
Profile photo of Mall Staff 184060.00 $tone October 31, 2019
Public

Hi there,

I saved each store/site/ store view

How about the error message you mentioned above after that:

The stock item was unable to be saved. Please try again.

Also, I saw this: https://prnt.sc/pqg6if in your backend. Please reindex data at your end and make sure you complete reindexing data successfully. And then, clean M2 cache.

Regards,
Mall.

#19
Profile photo of Mall Staff 184060.00 $tone October 31, 2019
Public

Hi there,

Could they have come from the M1 system?

Yes, that might be the case. Do you see those fields in the product’s editing page in your M1 site?
 
If the related third-party extension is not ready in your M2 site yet, you should disable the required value on those attributes to save your time when editing migrated products in M2. (You can do this in the product attributes management in your M2’s backend)
 
Regards,
Mall.

#23
Profile photo of ubdev Staff 98150.00 $tone October 31, 2019
Public

Hi there, 
Glad that it helps. 
In case you have any additional question, please get back to us here. 
Regards,
Ubertheme team

#25

Please login or Register to Submit Answer

Written By

Comments