cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to serialize

Unable to serialize

When I go to open an order i get the following error

{"0":"Unable to unserialize value.","1":"#0 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Model\/ResourceModel\/AbstractResource.php(153): Magento\\Framework\\Serialize\\Serializer\\Json->unserialize('a:1:{s:15:\"info...')\n#1 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Model\/ResourceModel\/Db\/AbstractDb.php(505): Magento\\Framework\\Model\\ResourceModel\\AbstractResource->_unserializeField(Object(Magento\\Sales\\Model\\Order\\Item\\Interceptor), 'product_options', Array)\n#2 \/home\/diybrewi\/public_html\/vendor\/magento\/module-sales\/Model\/ResourceModel\/Order\/Item\/Collection.php(62): Magento\\Framework\\Model\\ResourceModel\\Db\\AbstractDb->unserializeFields(Object(Magento\\Sales\\Model\\Order\\Item\\Interceptor))\n#3 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Data\/Collection\/AbstractDb.php(588): Magento\\Sales\\Model\\ResourceModel\\Order\\Item\\Collection->_afterLoad()\n#4 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Data\/Collection\/AbstractDb.php(559): Magento\\Framework\\Data\\Collection\\AbstractDb->loadWithFilter(false, false)\n#5 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Data\/Collection.php(831): Magento\\Framework\\Data\\Collection\\AbstractDb->load()\n#6 \/home\/diybrewi\/public_html\/vendor\/magento\/module-sales\/Model\/Order.php(1260): Magento\\Framework\\Data\\Collection->getIterator()\n#7 \/home\/diybrewi\/public_html\/vendor\/magento\/module-sales\/Model\/Order.php(1936): Magento\\Sales\\Model\\Order->getItemsCollection()\n#8 \/home\/diybrewi\/public_html\/vendor\/magento\/module-sales\/Model\/Order\/ShippingAssignmentBuilder.php(86): Magento\\Sales\\Model\\Order->getItems()\n#9 \/home\/diybrewi\/public_html\/vendor\/magento\/module-sales\/Model\/OrderRepository.php(187): Magento\\Sales\\Model\\Order\\ShippingAssignmentBuilder->create()\n#10 \/home\/diybrewi\/public_html\/vendor\/magento\/module-sales\/Model\/OrderRepository.php(98): Magento\\Sales\\Model\\OrderRepository->setShippingAssignments(Object(Magento\\Sales\\Model\\Order\\Interceptor))\n#11 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Sales\\Model\\OrderRepository->get('3302')\n#12 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Sales\\Model\\OrderRepository\\Interceptor->___callParent('get', Array)\n#13 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Sales\\Model\\OrderRepository\\Interceptor->Magento\\Framework\\Interception\\{closure}('3302')\n#14 \/home\/diybrewi\/public_html\/generated\/code\/Magento\/Sales\/Model\/OrderRepository\/Interceptor.php(26): Magento\\Sales\\Model\\OrderRepository\\Interceptor->___callPlugins('get', Array, Array)\n#15 \/home\/diybrewi\/public_html\/vendor\/magento\/module-sales\/Controller\/Adminhtml\/Order.php(155): Magento\\Sales\\Model\\OrderRepository\\Interceptor->get('3302')\n#16 \/home\/diybrewi\/public_html\/vendor\/magento\/module-sales\/Controller\/Adminhtml\/Order\/View.php(26): Magento\\Sales\\Controller\\Adminhtml\\Order->_initOrder()\n#17 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/App\/Action\/Action.php(107): Magento\\Sales\\Controller\\Adminhtml\\Order\\View->execute()\n#18 \/home\/diybrewi\/public_html\/vendor\/magento\/module-backend\/App\/AbstractAction.php(229): Magento\\Framework\\App\\Action\\Action->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#19 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Backend\\App\\AbstractAction->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#20 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Sales\\Controller\\Adminhtml\\Order\\View\\Interceptor->___callParent('dispatch', Array)\n#21 \/home\/diybrewi\/public_html\/vendor\/magento\/module-backend\/App\/Action\/Plugin\/Authentication.php(143): Magento\\Sales\\Controller\\Adminhtml\\Order\\View\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#22 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php(135): Magento\\Backend\\App\\Action\\Plugin\\Authentication->aroundDispatch(Object(Magento\\Sales\\Controller\\Adminhtml\\Order\\View\\Interceptor), Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))\n#23 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Sales\\Controller\\Adminhtml\\Order\\View\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#24 \/home\/diybrewi\/public_html\/generated\/code\/Magento\/Sales\/Controller\/Adminhtml\/Order\/View\/Interceptor.php(26): Magento\\Sales\\Controller\\Adminhtml\\Order\\View\\Interceptor->___callPlugins('dispatch', Array, NULL)\n#25 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/App\/FrontController.php(55): Magento\\Sales\\Controller\\Adminhtml\\Order\\View\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#26 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Framework\\App\\FrontController->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#27 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch', Array)\n#28 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#29 \/home\/diybrewi\/public_html\/generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php(26): Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch', Array, Array)\n#30 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/App\/Http.php(135): Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#31 \/home\/diybrewi\/public_html\/generated\/code\/Magento\/Framework\/App\/Http\/Interceptor.php(24): Magento\\Framework\\App\\Http->launch()\n#32 \/home\/diybrewi\/public_html\/vendor\/magento\/framework\/App\/Bootstrap.php(256): Magento\\Framework\\App\\Http\\Interceptor->launch()\n#33 \/home\/diybrewi\/public_html\/index.php(39): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#34 {main}","url":"\/admin_041677\/sales\/order\/view\/order_id\/3302\/key\/9160187f2decca5e7251adb487656e45088910b61b70eaa7643b3020b3edb7b6\/","script_name":"\/index.php"}

I have tried to flush my redis and this did not help 

Any help is appreciated please 

3 REPLIES 3

Re: Unable to serialize

You have broken data in product_options column of sales_order_item table.

Go to MySQL and run this select:

 

select product_options from sales_order_item where order_id=[paste your order ID here];

 

Paste here the result of that query and I will tell you what to do next.

Re: Unable to serialize

I get nothing from that query. I think it might have to do with redis

Re: Unable to serialize

Sorry I tried it again and got the following result

a:1:{s:15:"info_buyRequest";a:2:{s:3:"qty";s:1:"1"...
a:1:{s:15:"info_buyRequest";a:2:{s:3:"qty";s:1:"1"...
a:1:{s:15:"info_buyRequest";a:2:{s:3:"qty";s:1:"1"...
a:1:{s:15:"info_buyRequest";a:2:{s:3:"qty";s:1:"1"...
a:1:{s:15:"info_buyRequest";a:2:{s:3:"qty";s:1:"5"...
a:1:{s:15:"info_buyRequest";a:2:{s:3:"qty";s:1:"4"...