I have done data migration using data migration tool from magento 1.9.x to 2.2.4, but it doesn’t import admin users as mentioned in the docs, and we need to manually copy the admin users.
What I have done is, I have simply copied the users from magento1DB.admin_user to magento2DB.admin_user table. I can see that users are now appearing in the Magento2 backend, but when I try to edit any admin user, it throws an exception.
Exception #0 (InvalidArgumentException): Unable to unserialize value
Also, I cannot login with the Magento1 admin user in Magento2 admin panel.
Couldn’t find any help, does any one have an idea?
2
Answers
There is a workaround – you can check if string is serialized and then use
serialize($string)
.Change unserialize to:
and add function to check if string is serialized:
Changing in core file is not good idea, so I would recommend to just identify the table by reviewing exception then describe that table to see which field can consist searialized value, find it by select query, once you identify the serialized field in table the convert that to json and update to table, Here is code to convert serialized data to json data: