cancel
Showing results for 
Search instead for 
Did you mean: 

Unserialize Error while updating to 2.3.5 from 2.1.13

Unserialize Error while updating to 2.3.5 from 2.1.13

I've attempted to upgrade from 2.1.13 directly to 2.3.5

I've worked through all the issues of updating via composer and am trying to run setup:upgrade but it is getting stuck at Module_UrlRewrite

 

I am getting the error:

Unable to apply data patch Magento\UrlRewrite\Setup\Patch\Data\ConvertSerializedDataToJson for module Magento_UrlRewrite. Original exception message: Error Converting field 'metadata' in table 'url_rewrite' where 'url_rewrite_id'= #####, ##### using Magento\Framework\DB\DataConverter\SerializedToJson.

Fix data or replace with valid value.

Failure Reason : 'Unable to unserialize value.'

 

 

 

2 REPLIES 2

Re: Unserialize Error while updating to 2.3.5 from 2.1.13

I was able to resolve this issue by running the follow SQL statement (https://magento.stackexchange.com/questions/196059/magento-2-1-9-upgrade-to-2-2-0-error-on-setupupgr...):

 

 

UPDATE url_rewrite SET metadata=NULL WHERE metadata='';

I hope this helps someone else.

 

Re: Unserialize Error while updating to 2.3.5 from 2.1.13

Hi @kitestop 

 

Yes that is the correct step to resolve this issue.

 

Basically after 2.2.X released there is code level change is there in the native Magento specifically for this serialized and unserialize functions and that's the reasons developers are facing this issue.

 

This is a known issue and setting up the meta data and sales_order_data table value as empty will resolve this issue.

if issue solved,Click Kudos & Accept as Solution