Bug with UB Data Migration Pro

Hi guys,
I’m using the UB Data Migration Pro extension to migrate data from M1.9 to M2.2 for my store. Everything appears to have been migrated properly (I haven’t looked into everything yet) but I did notice an issue with the order items, specifically with the options. Basically i can’t open any orders in the admin, it throws an exception “Exception #0 (InvalidArgumentException): Unable to unserialize value.'”. I dug into this a bit, and it appears that Magento 2 uses json_encode / json_decode to store the order items options, specifically the product_options field in the sales_order_item table. Magento 1 uses php serialize / unserialize.
It seems to me like your tool is missing a step here and should be effectively unserializing the data, then json_encoding it and storing it in the field. Have you guys heard of this issue before and what do you recommend I do?
Thanks,
David

11 answers

Profile photo of Mall Staff 184060.00 $tone October 7, 2017
Public

Hi there,

I dug into this a bit, and it appears that Magento 2 uses json_encode / json_decode to store the order items options, specifically the product_options field in the sales_order_item table. Magento 1 uses php serialize / unserialize.

Yes, maybe that is root of the issue as you mentioned. Kindly give me more time, i will check further about that issue in my local first and then i will tell you work around to solve that.
Thanks for your wating time.
Regards,
Mall.

#1
Profile photo of Mall Staff 184060.00 $tone October 9, 2017
Public

Hi there,

I dug into this a bit, and it appears that Magento 2 uses json_encode / json_decode to store the order items options, specifically the product_options field in the sales_order_item table. Magento 1 uses php serialize / unserialize.

I have checked further in my local instance and found the root issue was that because Magento ver.2.2.0 has changed multiple portions (product_options…) in sales data section.
To handle that, we have added more tweak code in the step #7 in ver.3.1.1 of our tool. You could follow steps below to solve the issue you mentioned:
Step 1: Download the PHP file at HERE
Step 2: Upload the downloaded file to replace the file at the path: pub/ub-tool/protected/controllers/Step7Controller.php
Step 3: Reset data migration from steps #8, #7 and restart data migration in these steps.
Once done, reindex your data and clean the Magento cache.
Then tell me know how it goes.
Regards,
Mall.
 

#2
Profile photo of davidwebber -10.00 $tone October 10, 2017
Public

So I’ve uploaded that patched file, re-ran the import, now i’m getting the error “No such entity.” everywhere in the admin / frontend. It appears to have nuked the entire site…

#3
Profile photo of Mall Staff 184060.00 $tone October 11, 2017
Public

Hi there,

 re-ran the import,

How did you run? Did you re-run for all steps or specify steps as my suggesting?
Let’s try clean the Magento cache by cli command: php -f bin/magento cache:clean
And tel me know how it goes.
Regards,
Mall.

#4
Profile photo of juliorosier 130.00 $tone October 17, 2017
Public

Hi Guys,
 
How dit this finish. As I have exactly the same problem.
I want to try out the solution. But I first need to know if it works correct.
 
thanks

Julio 

#5
Profile photo of Mall Staff 184060.00 $tone October 17, 2017
Public

Hi there,

So I’ve uploaded that patched file, re-ran the import, now i’m getting the error “No such entity.” everywhere in the admin / frontend. It appears to have nuked the entire site…

So, how about that issue now? Did you do reset data migration from steps #2 -> #8 of our tool after my first reply #2?
Regards,
Mall.

#7
Profile photo of juliorosier 130.00 $tone October 20, 2017
Public

Hi,
I have reset step #7 and #8 like you recommend.
About the settings is step #7
https://www.dropbox.com/s/v4ugz3m0wne9s62/Schermafbeelding%202017-10-20%20om%2014.56.13.jpg?dl=0
I have some questions

  1. Sales Aggregated Data is only for reporting right? Do you recommend to import? By default it is not checked? Do you recommend not to import?
  2. KEEP ORIGINAL IDS. What is the advanced of that? By default it is not checked? Do you recommend not to check this?

 
thanks
 
Julio 

#8
Profile photo of Mall Staff 184060.00 $tone October 20, 2017
Public

Hi there,

Sales Aggregated Data is only for reporting right? Do you recommend to import? By default it is not checked? Do you recommend not to import?

Yes, that data section is optional.

  1. KEEP ORIGINAL IDS. What is the advanced of that? By default it is not checked? Do you recommend not to check this?

That is optional too. If you wish to keep original IDs of sales data objects (sales rules, sales orders, sales payments…) you could check to this option (before select this, you have to make sure that, your Magento2’s database is a fresh instance)
Regards,
Mall.

#9
Profile photo of BIGAND JEROME 630.00 $tone May 31, 2018
Public

Hi, what do you mean by “before select this, you have to make sure that, your Magento2’s database is a fresh instance” ?
Does it mean that if we check this option “KEEP ORIGINAL IDS” at the first use, we can’t use DELTA migration option in the future because need a fresh install even after the first mirgation process ?

#10
Profile photo of ubdev Staff 98370.00 $tone May 31, 2018
Public

Hi Bigand Jerome,
We do explain about the ‘Keep Original IDs’ setting via this blog post, please take a look.  
In order to enable the ‘Keep Original IDs’ setting, your Magento 2 instance must be a fresh instance. And if you plan to run delta migration later on, you should not add any new data items to your Magento 2 after your first migration. Otherwise, it might cause data conflict in the delta phase. 
If you does not enable the ‘Keep Original IDs’, you can discard the restriction above, and proceed delta migration as normal. 
PS. For additional question, please help to submit a new ticket, we will help you out. 
Regards,
Ubertheme team
 

#11

Please login or Register to Submit Answer

Written By

Comments