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
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.
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.
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…
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.
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
I see now I already run 3.1.1 of UB Data Migration Pro
thanks
Julio
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.
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
- 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?
- KEEP ORIGINAL IDS. What is the advanced of that? By default it is not checked? Do you recommend not to check this?
thanks
Julio
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.
- 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.
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 ?
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