Hello Magento Friends,

How are you all doing? I am here with this tutorial to solve the issue of unable to serialize value in Magento 2.

While upgrading the Magento 2 version, sometimes you may face the unable to serialize value error on the checkout page.

“report.CRITICAL: Unable to serialize value. Error: Malformed UTF-8 characters, possible incorrectly encoded.“ 

Upgrade your Magento store error-free with the Best Magento Upgrade service

For now, let’s move on to solve the unable to serialize value error in Magento 2.

How to Solve Unable To Serialize Value Error in Magento 2?

Step 1: Create registration.php at the given below path

app\code\Vendor\Extension\registration.php

Now, add the code as follows

Step 2: Create module.xml at the below path

app\code\Vendor\Extension\etc\module.xml

Then add the code as mentioned below

Step 3: Create di.xml at the following path

app\code\Vendor\Extension\etc\di.xml

Then append the code as given below

Step 4: Now, create Json.php at the path mentioned below

app\code\Vendor\Extension\Rewrite\Magento\Framework\Serialize\Serializer\Json.php

And include the code in it as given below

Step 5: Now, create JsonHexTag.php at the following path

app\code\Vendor\Extension\Rewrite\Magento\Framework\Serialize\Serializer\JsonHexTag.php

Then write the code as below

Conclusion:

This way you can easily get rid of the serialize value error in Magento 2. If you have any doubts about the above steps, contact me via the comment section. Share the solution with your other developer friends to help them get out of the unable to serialize error.

Happy Coding!

Click to rate this post!
[Total: 6 Average: 4.8]