Unable to serialize value. at /public_html/vendor/magento/framework/Serialize/Serializer/Json.php:26)"} []Magento 2.2: Unable to unserialize value?Unable to Serialize Value Magento 2.2.6Magento 2.2 error: Unable to unserialize valueUnable to unserialize value - when adding to website magento 2.2Error: Exception #0 (InvalidArgumentException): Unable to serialize value - Produced by custom ThemeMagento 2, Unable to save products (Catalog rule indexing failed. See details in exception log.)Magento 2 undefined variable framework/App/ErrorHandlerFailure reason: 'Unable to unserialize value, string is corrupted.' after upgrade magento 2.1.5 to magento 2.2.6Unable to serialize value, string is corrupted - error thrown by Serialized.php not in Json.phpUnable to Serialize Value Magento 2.2.6Unable to serialize value problem with Magento 2.2.6“No such entity” ERROR in magento 2.4 admin after upgrade

What would be the way to say "just saying" in German? (Not the literal translation)

2019 gold coins to share

How can powerful telekinesis avoid violating Newton's 3rd Law?

Rail-to-rail op-amp only reaches 90% of VCC, works sometimes, not everytime

Should I refuse to be named as co-author of a low quality paper?

Why does this query, missing a FROM clause, not error out?

How can I use the SpendProofV1 to prove I sent Monero to an exchange?

Proving that a Russian cryptographic standard is too structured

Section numbering in binary

Why do RNNs usually have fewer hidden layers than CNNs?

Is there a set of positive integers of density 1 which contains no infinite arithmetic progression?

Can we completely replace inheritance using strategy pattern and dependency injection?

Do you have to have figures when playing D&D?

What STL algorithm can determine if exactly one item in a container satisfies a predicate?

empApi with Lightning Web Components?

Confused with atmospheric pressure equals plastic balloon’s inner pressure

Why is Na5 not played in this line of the French Defense, Advance Variation?

Write a function that checks if a string starts with or contains something

How long is it safe to leave marker on a Chessex battle map?

What would prevent chimeras from reproducing with each other?

Is it possible to have 2 different but equal size real number sets that have the same mean and standard deviation?

bash vs. zsh: What are the practical differences?

Why Does Mama Coco Look Old After Going to the Other World?

Why are MBA programs closing in the United States?



Unable to serialize value. at /public_html/vendor/magento/framework/Serialize/Serializer/Json.php:26)"} []


Magento 2.2: Unable to unserialize value?Unable to Serialize Value Magento 2.2.6Magento 2.2 error: Unable to unserialize valueUnable to unserialize value - when adding to website magento 2.2Error: Exception #0 (InvalidArgumentException): Unable to serialize value - Produced by custom ThemeMagento 2, Unable to save products (Catalog rule indexing failed. See details in exception log.)Magento 2 undefined variable framework/App/ErrorHandlerFailure reason: 'Unable to unserialize value, string is corrupted.' after upgrade magento 2.1.5 to magento 2.2.6Unable to serialize value, string is corrupted - error thrown by Serialized.php not in Json.phpUnable to Serialize Value Magento 2.2.6Unable to serialize value problem with Magento 2.2.6“No such entity” ERROR in magento 2.4 admin after upgrade






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1
















main.CRITICAL: Unable to serialize value. "exception":"[object]
(InvalidArgumentException(code: 0): Unable to serialize value. at
/public_html/vendor/magento/framework/Serialize/Serializer/Json.php:26)"
[]




magento version: 2.2.6



current Json.php



<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace MagentoFrameworkSerializeSerializer;

use MagentoFrameworkSerializeSerializerInterface;

/**
* Serialize data to JSON, unserialize JSON encoded data
*
* @api
* @since 100.2.0
*/
class Json implements SerializerInterface

/**
* @inheritDoc
* @since 100.2.0
*/
public function serialize($data)

$result = json_encode($data);
if (false === $result)
throw new InvalidArgumentException('Unable to serialize value.');

return $result;



/**
* @inheritDoc
* @since 100.2.0
*/
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;





previous Json.php with fixes, i remember it created some issues on the site so i reverted back.



<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace MagentoFrameworkSerializeSerializer;

use MagentoFrameworkSerializeSerializerInterface;

/**
* Serialize data to JSON, unserialize JSON encoded data
*
* @api
* @since 100.2.0
*/
class Json implements SerializerInterface

/**
* @inheritDoc
* @since 100.2.0
*/
public function serialize($data)

$result = json_encode($data);
if (false === $result)
throw new InvalidArgumentException('Unable to serialize value.');

return $result;



/**
* @inheritDoc
* @since 100.2.0
*/
public function unserialize($string)

/* old function
$result = json_decode($string, true);
if (json_last_error() !== JSON_ERROR_NONE)
throw new InvalidArgumentException('Unable to unserialize value.');

return $result;
*/
if($this->is_serialized($string))

$string = $this->serialize($string);

$result = json_decode($string, true);
if (json_last_error() !== JSON_ERROR_NONE)
throw new InvalidArgumentException('Unable to unserialize value.');


return $result;


function is_serialized($value, &$result = null)

// Bit of a give away this one
if (!is_string($value))

return false;

// Serialized false, return true. unserialize() returns false on an
// invalid string or it could return false if the string is serialized
// false, eliminate that possibility.
if ($value === 'b:0;')

$result = false;
return true;

$length = strlen($value);
$end = '';
switch ($value[0])

case 's':
if ($value[$length - 2] !== '"')

return false;

case 'b':
case 'i':
case 'd':
// This looks odd but it is quicker than isset()ing
$end .= ';';
case 'a':
case 'O':
$end .= '';
if ($value[1] !== ':')

return false;

switch ($value[2])

case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
break;
default:
return false;

case 'N':
$end .= ';';
if ($value[$length - 1] !== $end[0])

return false;

break;
default:
return false;

if (($result = @unserialize($value)) === false)

$result = null;
return false;

return true;

}


similar issues:



Unable to Serialize Value Magento 2.2.6



Magento 2.2: Unable to unserialize value?










share|improve this question




























    1
















    main.CRITICAL: Unable to serialize value. "exception":"[object]
    (InvalidArgumentException(code: 0): Unable to serialize value. at
    /public_html/vendor/magento/framework/Serialize/Serializer/Json.php:26)"
    []




    magento version: 2.2.6



    current Json.php



    <?php
    /**
    * Copyright © Magento, Inc. All rights reserved.
    * See COPYING.txt for license details.
    */
    namespace MagentoFrameworkSerializeSerializer;

    use MagentoFrameworkSerializeSerializerInterface;

    /**
    * Serialize data to JSON, unserialize JSON encoded data
    *
    * @api
    * @since 100.2.0
    */
    class Json implements SerializerInterface

    /**
    * @inheritDoc
    * @since 100.2.0
    */
    public function serialize($data)

    $result = json_encode($data);
    if (false === $result)
    throw new InvalidArgumentException('Unable to serialize value.');

    return $result;



    /**
    * @inheritDoc
    * @since 100.2.0
    */
    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;





    previous Json.php with fixes, i remember it created some issues on the site so i reverted back.



    <?php
    /**
    * Copyright © Magento, Inc. All rights reserved.
    * See COPYING.txt for license details.
    */
    namespace MagentoFrameworkSerializeSerializer;

    use MagentoFrameworkSerializeSerializerInterface;

    /**
    * Serialize data to JSON, unserialize JSON encoded data
    *
    * @api
    * @since 100.2.0
    */
    class Json implements SerializerInterface

    /**
    * @inheritDoc
    * @since 100.2.0
    */
    public function serialize($data)

    $result = json_encode($data);
    if (false === $result)
    throw new InvalidArgumentException('Unable to serialize value.');

    return $result;



    /**
    * @inheritDoc
    * @since 100.2.0
    */
    public function unserialize($string)

    /* old function
    $result = json_decode($string, true);
    if (json_last_error() !== JSON_ERROR_NONE)
    throw new InvalidArgumentException('Unable to unserialize value.');

    return $result;
    */
    if($this->is_serialized($string))

    $string = $this->serialize($string);

    $result = json_decode($string, true);
    if (json_last_error() !== JSON_ERROR_NONE)
    throw new InvalidArgumentException('Unable to unserialize value.');


    return $result;


    function is_serialized($value, &$result = null)

    // Bit of a give away this one
    if (!is_string($value))

    return false;

    // Serialized false, return true. unserialize() returns false on an
    // invalid string or it could return false if the string is serialized
    // false, eliminate that possibility.
    if ($value === 'b:0;')

    $result = false;
    return true;

    $length = strlen($value);
    $end = '';
    switch ($value[0])

    case 's':
    if ($value[$length - 2] !== '"')

    return false;

    case 'b':
    case 'i':
    case 'd':
    // This looks odd but it is quicker than isset()ing
    $end .= ';';
    case 'a':
    case 'O':
    $end .= '';
    if ($value[1] !== ':')

    return false;

    switch ($value[2])

    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    break;
    default:
    return false;

    case 'N':
    $end .= ';';
    if ($value[$length - 1] !== $end[0])

    return false;

    break;
    default:
    return false;

    if (($result = @unserialize($value)) === false)

    $result = null;
    return false;

    return true;

    }


    similar issues:



    Unable to Serialize Value Magento 2.2.6



    Magento 2.2: Unable to unserialize value?










    share|improve this question
























      1












      1








      1









      main.CRITICAL: Unable to serialize value. "exception":"[object]
      (InvalidArgumentException(code: 0): Unable to serialize value. at
      /public_html/vendor/magento/framework/Serialize/Serializer/Json.php:26)"
      []




      magento version: 2.2.6



      current Json.php



      <?php
      /**
      * Copyright © Magento, Inc. All rights reserved.
      * See COPYING.txt for license details.
      */
      namespace MagentoFrameworkSerializeSerializer;

      use MagentoFrameworkSerializeSerializerInterface;

      /**
      * Serialize data to JSON, unserialize JSON encoded data
      *
      * @api
      * @since 100.2.0
      */
      class Json implements SerializerInterface

      /**
      * @inheritDoc
      * @since 100.2.0
      */
      public function serialize($data)

      $result = json_encode($data);
      if (false === $result)
      throw new InvalidArgumentException('Unable to serialize value.');

      return $result;



      /**
      * @inheritDoc
      * @since 100.2.0
      */
      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;





      previous Json.php with fixes, i remember it created some issues on the site so i reverted back.



      <?php
      /**
      * Copyright © Magento, Inc. All rights reserved.
      * See COPYING.txt for license details.
      */
      namespace MagentoFrameworkSerializeSerializer;

      use MagentoFrameworkSerializeSerializerInterface;

      /**
      * Serialize data to JSON, unserialize JSON encoded data
      *
      * @api
      * @since 100.2.0
      */
      class Json implements SerializerInterface

      /**
      * @inheritDoc
      * @since 100.2.0
      */
      public function serialize($data)

      $result = json_encode($data);
      if (false === $result)
      throw new InvalidArgumentException('Unable to serialize value.');

      return $result;



      /**
      * @inheritDoc
      * @since 100.2.0
      */
      public function unserialize($string)

      /* old function
      $result = json_decode($string, true);
      if (json_last_error() !== JSON_ERROR_NONE)
      throw new InvalidArgumentException('Unable to unserialize value.');

      return $result;
      */
      if($this->is_serialized($string))

      $string = $this->serialize($string);

      $result = json_decode($string, true);
      if (json_last_error() !== JSON_ERROR_NONE)
      throw new InvalidArgumentException('Unable to unserialize value.');


      return $result;


      function is_serialized($value, &$result = null)

      // Bit of a give away this one
      if (!is_string($value))

      return false;

      // Serialized false, return true. unserialize() returns false on an
      // invalid string or it could return false if the string is serialized
      // false, eliminate that possibility.
      if ($value === 'b:0;')

      $result = false;
      return true;

      $length = strlen($value);
      $end = '';
      switch ($value[0])

      case 's':
      if ($value[$length - 2] !== '"')

      return false;

      case 'b':
      case 'i':
      case 'd':
      // This looks odd but it is quicker than isset()ing
      $end .= ';';
      case 'a':
      case 'O':
      $end .= '';
      if ($value[1] !== ':')

      return false;

      switch ($value[2])

      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      break;
      default:
      return false;

      case 'N':
      $end .= ';';
      if ($value[$length - 1] !== $end[0])

      return false;

      break;
      default:
      return false;

      if (($result = @unserialize($value)) === false)

      $result = null;
      return false;

      return true;

      }


      similar issues:



      Unable to Serialize Value Magento 2.2.6



      Magento 2.2: Unable to unserialize value?










      share|improve this question















      main.CRITICAL: Unable to serialize value. "exception":"[object]
      (InvalidArgumentException(code: 0): Unable to serialize value. at
      /public_html/vendor/magento/framework/Serialize/Serializer/Json.php:26)"
      []




      magento version: 2.2.6



      current Json.php



      <?php
      /**
      * Copyright © Magento, Inc. All rights reserved.
      * See COPYING.txt for license details.
      */
      namespace MagentoFrameworkSerializeSerializer;

      use MagentoFrameworkSerializeSerializerInterface;

      /**
      * Serialize data to JSON, unserialize JSON encoded data
      *
      * @api
      * @since 100.2.0
      */
      class Json implements SerializerInterface

      /**
      * @inheritDoc
      * @since 100.2.0
      */
      public function serialize($data)

      $result = json_encode($data);
      if (false === $result)
      throw new InvalidArgumentException('Unable to serialize value.');

      return $result;



      /**
      * @inheritDoc
      * @since 100.2.0
      */
      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;





      previous Json.php with fixes, i remember it created some issues on the site so i reverted back.



      <?php
      /**
      * Copyright © Magento, Inc. All rights reserved.
      * See COPYING.txt for license details.
      */
      namespace MagentoFrameworkSerializeSerializer;

      use MagentoFrameworkSerializeSerializerInterface;

      /**
      * Serialize data to JSON, unserialize JSON encoded data
      *
      * @api
      * @since 100.2.0
      */
      class Json implements SerializerInterface

      /**
      * @inheritDoc
      * @since 100.2.0
      */
      public function serialize($data)

      $result = json_encode($data);
      if (false === $result)
      throw new InvalidArgumentException('Unable to serialize value.');

      return $result;



      /**
      * @inheritDoc
      * @since 100.2.0
      */
      public function unserialize($string)

      /* old function
      $result = json_decode($string, true);
      if (json_last_error() !== JSON_ERROR_NONE)
      throw new InvalidArgumentException('Unable to unserialize value.');

      return $result;
      */
      if($this->is_serialized($string))

      $string = $this->serialize($string);

      $result = json_decode($string, true);
      if (json_last_error() !== JSON_ERROR_NONE)
      throw new InvalidArgumentException('Unable to unserialize value.');


      return $result;


      function is_serialized($value, &$result = null)

      // Bit of a give away this one
      if (!is_string($value))

      return false;

      // Serialized false, return true. unserialize() returns false on an
      // invalid string or it could return false if the string is serialized
      // false, eliminate that possibility.
      if ($value === 'b:0;')

      $result = false;
      return true;

      $length = strlen($value);
      $end = '';
      switch ($value[0])

      case 's':
      if ($value[$length - 2] !== '"')

      return false;

      case 'b':
      case 'i':
      case 'd':
      // This looks odd but it is quicker than isset()ing
      $end .= ';';
      case 'a':
      case 'O':
      $end .= '';
      if ($value[1] !== ':')

      return false;

      switch ($value[2])

      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      break;
      default:
      return false;

      case 'N':
      $end .= ';';
      if ($value[$length - 1] !== $end[0])

      return false;

      break;
      default:
      return false;

      if (($result = @unserialize($value)) === false)

      $result = null;
      return false;

      return true;

      }


      similar issues:



      Unable to Serialize Value Magento 2.2.6



      Magento 2.2: Unable to unserialize value?







      magento2 exception json unserialize serialize






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 3 at 19:20









      Kris WenKris Wen

      3509




      3509




















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f277126%2funable-to-serialize-value-at-public-html-vendor-magento-framework-serialize-se%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f277126%2funable-to-serialize-value-at-public-html-vendor-magento-framework-serialize-se%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Get RecordId in LWC From Community PageLWC Community recordId undefinedhow to get Personal Access Token from my integrated application LWC. I am using js onlylwc quick action from Opportunity page(aura:component) and not getting @api recordIdLWC Community recordId undefinedLWC - How to get label name of buttonsLWC: Add a region in custom community themeVisual force page redirection from lightning communityLWC NavigationMixin does not work in CommunityInvoking LWC component from a plain URL - Read URL Parameter inside LWCLWC download PDF fileLWC Get Pick-list Field Values