4

While Editing The Customer, I'm Getting This Message. How Can I Solve This.?

I found there was an issue with this method in

vendor/magento/framework/Serialize/Serializer/Json.php

public function unserialize($string)
{
    $result = json_decode($string, true);
    if (json_last_error() !== JSON_ERROR_NONE) {
        throw new \InvalidArgumentException('Unable to unserialize value.');
    }
    return $result;
}

Customer Edit Screen

Please help me out. Thanks!

3
  • What is stored inside the $string when error thrown? Jan 8 '19 at 8:50
  • I have the same problem Jan 8 '19 at 20:49
  • @SiarheyUchukhlebau, I see the same error in Magento 2.2.x, do you recall what you had to do fix this issue?
    – cnu
    Feb 25 '20 at 3:01
6

I also came accross this error today, for me i discovered it was the Ebizmarts_MailChimp module that was causing the issue, you can disable the module entirely which corrected the issue or what i chose to do instead was

rename the file

/vendor/mailchimp/mc-magento2/view/adminhtml/layoutc/customer_index_edit.xml

to

customer_index_edit.xml.bak

which stops the ebizmarts customer edit tab loading on the customer edit screen which solves the issue for now (its not a tab i used anyway), i checked and i was using the latest version of the module.

1
  • Thank you. This was also my problem. Perfect Jan 13 '19 at 20:54
1

The solution is simple. Update the mailchimp extension to the current version (look at https://github.com/mailchimp/mc-magento2/releases to know what version you must install) and truncate the table mailchimp_interest_group This is because the way to serialize the interest_group changes, and in the table the saved values are in the old way.

Best

0

I was able to fix it by overriding one line from Ebizmarts\MailChimp\Helper\Data. You must change: $groups = $this->unserialize($interestGroup->getGroupdata()); to $groups =$interestGroup->getGroupdata();

You can do it by creating another module and inside a di.xml file override this helper.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.