Magento 2.2.1 Unable to serialize value
I have upgraded website from 2.1.6 to 2.2.1 and facing Unable to serialize value error in frontend and backend.
{"0":"Unable to serialize value.","1":"#0 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Translate.php(494): Magento\Framework\Serialize\Serializer\Json->serialize(Array)n
#1 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Translate.php(190): Magento\Framework\Translate->_saveCache()n
#2 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(244): Magento\Framework\Translate->loadData(NULL, false)n
#3 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(215): Magento\Framework\App\Area->_initTranslate()n
#4 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(142): Magento\Framework\App\Area->_loadPart('translate')n
#5 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/View/DesignLoader.php(55): Magento\Framework\App\Area->load('translate')n
#6 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Action/Plugin/Design.php(48): Magento\Framework\View\DesignLoader->load()n
#7 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Framework\App\Action\Plugin\Design->beforeDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Magento\Framework\App\Request\Http))n
#8 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#9 /var/www/vhosts/demo.com/eiselec/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(39): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)n
#10 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))n
#11 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))n
#12 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)n
#13 /var/www/vhosts/demo.com/eiselec/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#14 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))n
#15 /var/www/vhosts/demo.com/eiselec/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#16 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))n
#17 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#18 /var/www/vhosts/demo.com/eiselec/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)n
#19 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))n
#20 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()n
#21 /var/www/vhosts/demo.com/eiselec/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))n
#22 {main}","url":"/","script_name":"/index.php"}
Let me know how can i resolve it.
Thanks
magento2 upgrade
add a comment |
I have upgraded website from 2.1.6 to 2.2.1 and facing Unable to serialize value error in frontend and backend.
{"0":"Unable to serialize value.","1":"#0 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Translate.php(494): Magento\Framework\Serialize\Serializer\Json->serialize(Array)n
#1 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Translate.php(190): Magento\Framework\Translate->_saveCache()n
#2 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(244): Magento\Framework\Translate->loadData(NULL, false)n
#3 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(215): Magento\Framework\App\Area->_initTranslate()n
#4 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(142): Magento\Framework\App\Area->_loadPart('translate')n
#5 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/View/DesignLoader.php(55): Magento\Framework\App\Area->load('translate')n
#6 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Action/Plugin/Design.php(48): Magento\Framework\View\DesignLoader->load()n
#7 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Framework\App\Action\Plugin\Design->beforeDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Magento\Framework\App\Request\Http))n
#8 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#9 /var/www/vhosts/demo.com/eiselec/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(39): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)n
#10 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))n
#11 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))n
#12 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)n
#13 /var/www/vhosts/demo.com/eiselec/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#14 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))n
#15 /var/www/vhosts/demo.com/eiselec/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#16 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))n
#17 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#18 /var/www/vhosts/demo.com/eiselec/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)n
#19 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))n
#20 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()n
#21 /var/www/vhosts/demo.com/eiselec/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))n
#22 {main}","url":"/","script_name":"/index.php"}
Let me know how can i resolve it.
Thanks
magento2 upgrade
Hi, I am talking about serialize value not unseriaize value.
– Meetanshi
Nov 21 '17 at 6:19
Have you tried clearing the cache ? not only Magento cache, external caches too if any .
– MGento
Nov 21 '17 at 6:22
yes, i have tried.
– Meetanshi
Nov 21 '17 at 6:23
Can you try to find out, what data you are trying to serialize ? Try traversing through your third party modules and find out, from which module, this error is triggered. You may probably need to override the serialize function, in the file /vendor/magento/framework/Serialize/Serializer/Json.php
– MGento
Nov 21 '17 at 8:51
Is this error happening during the DB update or after you've updated the DB to 2.2.1?
– drew7721
Nov 24 '17 at 19:48
add a comment |
I have upgraded website from 2.1.6 to 2.2.1 and facing Unable to serialize value error in frontend and backend.
{"0":"Unable to serialize value.","1":"#0 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Translate.php(494): Magento\Framework\Serialize\Serializer\Json->serialize(Array)n
#1 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Translate.php(190): Magento\Framework\Translate->_saveCache()n
#2 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(244): Magento\Framework\Translate->loadData(NULL, false)n
#3 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(215): Magento\Framework\App\Area->_initTranslate()n
#4 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(142): Magento\Framework\App\Area->_loadPart('translate')n
#5 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/View/DesignLoader.php(55): Magento\Framework\App\Area->load('translate')n
#6 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Action/Plugin/Design.php(48): Magento\Framework\View\DesignLoader->load()n
#7 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Framework\App\Action\Plugin\Design->beforeDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Magento\Framework\App\Request\Http))n
#8 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#9 /var/www/vhosts/demo.com/eiselec/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(39): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)n
#10 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))n
#11 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))n
#12 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)n
#13 /var/www/vhosts/demo.com/eiselec/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#14 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))n
#15 /var/www/vhosts/demo.com/eiselec/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#16 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))n
#17 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#18 /var/www/vhosts/demo.com/eiselec/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)n
#19 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))n
#20 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()n
#21 /var/www/vhosts/demo.com/eiselec/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))n
#22 {main}","url":"/","script_name":"/index.php"}
Let me know how can i resolve it.
Thanks
magento2 upgrade
I have upgraded website from 2.1.6 to 2.2.1 and facing Unable to serialize value error in frontend and backend.
{"0":"Unable to serialize value.","1":"#0 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Translate.php(494): Magento\Framework\Serialize\Serializer\Json->serialize(Array)n
#1 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Translate.php(190): Magento\Framework\Translate->_saveCache()n
#2 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(244): Magento\Framework\Translate->loadData(NULL, false)n
#3 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(215): Magento\Framework\App\Area->_initTranslate()n
#4 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Area.php(142): Magento\Framework\App\Area->_loadPart('translate')n
#5 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/View/DesignLoader.php(55): Magento\Framework\App\Area->load('translate')n
#6 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Action/Plugin/Design.php(48): Magento\Framework\View\DesignLoader->load()n
#7 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Framework\App\Action\Plugin\Design->beforeDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Magento\Framework\App\Request\Http))n
#8 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#9 /var/www/vhosts/demo.com/eiselec/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(39): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)n
#10 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))n
#11 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))n
#12 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)n
#13 /var/www/vhosts/demo.com/eiselec/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#14 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))n
#15 /var/www/vhosts/demo.com/eiselec/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#16 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))n
#17 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n
#18 /var/www/vhosts/demo.com/eiselec/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)n
#19 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))n
#20 /var/www/vhosts/demo.com/eiselec/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()n
#21 /var/www/vhosts/demo.com/eiselec/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))n
#22 {main}","url":"/","script_name":"/index.php"}
Let me know how can i resolve it.
Thanks
magento2 upgrade
magento2 upgrade
edited Nov 24 '17 at 21:43
KAndy
15.4k23043
15.4k23043
asked Nov 21 '17 at 6:07
MeetanshiMeetanshi
710319
710319
Hi, I am talking about serialize value not unseriaize value.
– Meetanshi
Nov 21 '17 at 6:19
Have you tried clearing the cache ? not only Magento cache, external caches too if any .
– MGento
Nov 21 '17 at 6:22
yes, i have tried.
– Meetanshi
Nov 21 '17 at 6:23
Can you try to find out, what data you are trying to serialize ? Try traversing through your third party modules and find out, from which module, this error is triggered. You may probably need to override the serialize function, in the file /vendor/magento/framework/Serialize/Serializer/Json.php
– MGento
Nov 21 '17 at 8:51
Is this error happening during the DB update or after you've updated the DB to 2.2.1?
– drew7721
Nov 24 '17 at 19:48
add a comment |
Hi, I am talking about serialize value not unseriaize value.
– Meetanshi
Nov 21 '17 at 6:19
Have you tried clearing the cache ? not only Magento cache, external caches too if any .
– MGento
Nov 21 '17 at 6:22
yes, i have tried.
– Meetanshi
Nov 21 '17 at 6:23
Can you try to find out, what data you are trying to serialize ? Try traversing through your third party modules and find out, from which module, this error is triggered. You may probably need to override the serialize function, in the file /vendor/magento/framework/Serialize/Serializer/Json.php
– MGento
Nov 21 '17 at 8:51
Is this error happening during the DB update or after you've updated the DB to 2.2.1?
– drew7721
Nov 24 '17 at 19:48
Hi, I am talking about serialize value not unseriaize value.
– Meetanshi
Nov 21 '17 at 6:19
Hi, I am talking about serialize value not unseriaize value.
– Meetanshi
Nov 21 '17 at 6:19
Have you tried clearing the cache ? not only Magento cache, external caches too if any .
– MGento
Nov 21 '17 at 6:22
Have you tried clearing the cache ? not only Magento cache, external caches too if any .
– MGento
Nov 21 '17 at 6:22
yes, i have tried.
– Meetanshi
Nov 21 '17 at 6:23
yes, i have tried.
– Meetanshi
Nov 21 '17 at 6:23
Can you try to find out, what data you are trying to serialize ? Try traversing through your third party modules and find out, from which module, this error is triggered. You may probably need to override the serialize function, in the file /vendor/magento/framework/Serialize/Serializer/Json.php
– MGento
Nov 21 '17 at 8:51
Can you try to find out, what data you are trying to serialize ? Try traversing through your third party modules and find out, from which module, this error is triggered. You may probably need to override the serialize function, in the file /vendor/magento/framework/Serialize/Serializer/Json.php
– MGento
Nov 21 '17 at 8:51
Is this error happening during the DB update or after you've updated the DB to 2.2.1?
– drew7721
Nov 24 '17 at 19:48
Is this error happening during the DB update or after you've updated the DB to 2.2.1?
– drew7721
Nov 24 '17 at 19:48
add a comment |
6 Answers
6
active
oldest
votes
i have the same behaviour with an template. I copied the code for the error to my serializer to get my problem.
As soon as i switch to de_DE and regenerate my static code via
sudo php bin/magento setup:static-content:deploy de_DE --jobs=0 -f
it throws "Malformed UTF-8 characters, possibly incorrectly encoded".
So i looked up the files i changed in the template folder (i.e. code/Mytheme/Bannerslider/i18n/de_DE.csv) and downloaded them via WinSCP. Notepad++ showed "Ansii Encoding" - hard it i used "magento i18n:collect-phrases" for the translation file to create.
magento2dev # encguess app/code/MyTheme/Bannerslider/i18n/de_DE.csv
app/code/MyTheme/Bannerslider/i18n/de_DE.csv US-ASCII
magento2dev # locale
LANG=de_DE.UTF-8
......
So i changed the files manually in Notepad++, uploaded them, deployed the static content and reset all permissions - en voila it works.
So, the bug could be in your i18n csv file.
add a comment |
As I can see this error comes from the method:
/**
* Saving data cache
*
* @return $this
*/
protected function _saveCache()
{
$this->_cache->save($this->getSerializer()->serialize($this->getData()), $this->getCacheId(true), , false);
return $this;
}
and serializer which is not found comes from the method:
/**
* Get serializer
*
* @return MagentoFrameworkSerializeSerializerInterface
* @deprecated 100.2.0
*/
private function getSerializer()
{
if ($this->serializer === null) {
$this->serializer = MagentoFrameworkAppObjectManager::getInstance()
->get(SerializeSerializerInterface::class);
}
return $this->serializer;
}
The preference for the SerializerInterface
was added since 2.2.x version of the Magento, and declared in the app/etc/di.xml:
<preference for="MagentoFrameworkSerializeSerializerInterface" type="MagentoFrameworkSerializeSerializerJson" />
So I think your cache is old or the preference for the SerializerInterface
is not working. Try to debug this issue by calling the MagentoFrameworkSerializeSerializerInterface
(using dependency injection) somwhere in code, and check which class returned by di:
public function __construct(MagentoFrameworkSerializeSerializerInterface $serializer)
{
echo get_class($serializer);
}
If it returns not an instance of the MagentoFrameworkSerializeSerializerJson
class returned - try to search this overwritten preference in the project and remove it.
If you are working on the remote server - firstly check the app/etc/di.xml
file on the server directly.
Another way you can temporarly modify the core Json
serializer and check which error returned:
Open the magento/framework/Serialize/Serializer/Json.php
and change this method from:
/**
* {@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;
}
to:
/**
* {@inheritDoc}
* @since 100.2.0
*/
public function serialize($data)
{
$result = json_encode($data);
if (false === $result) {
switch (json_last_error()) {
case JSON_ERROR_NONE:
$error = ' - No errors';
break;
case JSON_ERROR_DEPTH:
$error = ' - Maximum stack depth exceeded';
break;
case JSON_ERROR_STATE_MISMATCH:
$error = ' - Underflow or the modes mismatch';
break;
case JSON_ERROR_CTRL_CHAR:
$error = ' - Unexpected control character found';
break;
case JSON_ERROR_SYNTAX:
$error = ' - Syntax error, malformed JSON';
break;
case JSON_ERROR_UTF8:
$error = ' - Malformed UTF-8 characters, possibly incorrectly encoded';
break;
default:
$error = ' - Unknown error';
break;
}
throw new InvalidArgumentException('Unable to serialize value. Error: ' . $error);
}
return $result;
}
Then you can see after the exception message a json error. May be your data is broken. keep in mind that all the old data should be unserialized and serialized using json in the setup upgrade scripts during magento update.
PS: do not forget to revert back the core files after debugging complete! The better way is use xDebug for that purpose.
1
You should make that debugger-helper a core patch -- or suggest they use SAFE PHP github.com/thecodingmachine/safe
– Alex
Dec 11 '18 at 12:37
add a comment |
I've ran in the same issue with the upgrade to 2.2.1. I found this articel to be very helpful
http://devdocs.magento.com/guides/v2.2/ext-best-practices/tutorials/serialized-to-json-data-upgrade.html
Data stored in the DB should not be serialized anymore, it should now be saved as a JSON object.
Most modules make a data update that unserializes the data in the DB and stores it again under a JSON format. (BTW It took quite a while to run this...)
Hence, if one of your modules saves data that is serialized in the DB that data might not be readable by Magento anymore, you will need to make a data upgrade Setup file. Also, it might be a 3rd party module that needs to be updated to a 2.2+ compatible version.
If you do serialize on unserialize data anywhere in your code you might have to change that as well.
I hope this gives you a better insight at what's causing this error.
Cheers!
Make sure to read the Release Notes for 2.2.1, lots has changed, including the path for thegeneration
folder. ;)
– drew7721
Nov 24 '17 at 19:58
add a comment |
I ended up to exactly to the same situation. After adding the code above I got "Malformed UTF-8 characters, possibly incorrectly encoded"
I suppose that you are not using the default language. Try to change language to "default" en_US.
Meetanshi - Which language you are using in front-end and is the static-content creation also failing?
Hi @A.P, I am facing the same error and i am using de_DE language.
– Meetanshi
Dec 3 '17 at 10:28
Try change to en_US. Table core_config_data (general/locale/code) to en_US
– A.P
Dec 3 '17 at 10:45
same error after changing to en_US.
– Meetanshi
Dec 3 '17 at 10:54
I managed to get it up, but dead-end when trying get back to fi_FI. Did you cleared the cache?
– A.P
Dec 3 '17 at 11:02
yes, i cleared cache
– Meetanshi
Dec 3 '17 at 11:03
|
show 1 more comment
In my case the cause to a UTF8 Encoding problem, was non-multibyte safe shortening of product names:
$productName = strlen($productName) > 60 ? substr($productName,0,60)."..." :
$productName;
So a
012345678901234567890123456789012345678901234567890123456 Außengewinde
became
012345678901234567890123456789012345678901234567890123456 Au�...
add a comment |
For me the solution was to replace all special characters like "ä" in the translation csv file with html versions of the same character like this:
ä
Then I cleared caches and reloaded frontend.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f202448%2fmagento-2-2-1-unable-to-serialize-value%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
i have the same behaviour with an template. I copied the code for the error to my serializer to get my problem.
As soon as i switch to de_DE and regenerate my static code via
sudo php bin/magento setup:static-content:deploy de_DE --jobs=0 -f
it throws "Malformed UTF-8 characters, possibly incorrectly encoded".
So i looked up the files i changed in the template folder (i.e. code/Mytheme/Bannerslider/i18n/de_DE.csv) and downloaded them via WinSCP. Notepad++ showed "Ansii Encoding" - hard it i used "magento i18n:collect-phrases" for the translation file to create.
magento2dev # encguess app/code/MyTheme/Bannerslider/i18n/de_DE.csv
app/code/MyTheme/Bannerslider/i18n/de_DE.csv US-ASCII
magento2dev # locale
LANG=de_DE.UTF-8
......
So i changed the files manually in Notepad++, uploaded them, deployed the static content and reset all permissions - en voila it works.
So, the bug could be in your i18n csv file.
add a comment |
i have the same behaviour with an template. I copied the code for the error to my serializer to get my problem.
As soon as i switch to de_DE and regenerate my static code via
sudo php bin/magento setup:static-content:deploy de_DE --jobs=0 -f
it throws "Malformed UTF-8 characters, possibly incorrectly encoded".
So i looked up the files i changed in the template folder (i.e. code/Mytheme/Bannerslider/i18n/de_DE.csv) and downloaded them via WinSCP. Notepad++ showed "Ansii Encoding" - hard it i used "magento i18n:collect-phrases" for the translation file to create.
magento2dev # encguess app/code/MyTheme/Bannerslider/i18n/de_DE.csv
app/code/MyTheme/Bannerslider/i18n/de_DE.csv US-ASCII
magento2dev # locale
LANG=de_DE.UTF-8
......
So i changed the files manually in Notepad++, uploaded them, deployed the static content and reset all permissions - en voila it works.
So, the bug could be in your i18n csv file.
add a comment |
i have the same behaviour with an template. I copied the code for the error to my serializer to get my problem.
As soon as i switch to de_DE and regenerate my static code via
sudo php bin/magento setup:static-content:deploy de_DE --jobs=0 -f
it throws "Malformed UTF-8 characters, possibly incorrectly encoded".
So i looked up the files i changed in the template folder (i.e. code/Mytheme/Bannerslider/i18n/de_DE.csv) and downloaded them via WinSCP. Notepad++ showed "Ansii Encoding" - hard it i used "magento i18n:collect-phrases" for the translation file to create.
magento2dev # encguess app/code/MyTheme/Bannerslider/i18n/de_DE.csv
app/code/MyTheme/Bannerslider/i18n/de_DE.csv US-ASCII
magento2dev # locale
LANG=de_DE.UTF-8
......
So i changed the files manually in Notepad++, uploaded them, deployed the static content and reset all permissions - en voila it works.
So, the bug could be in your i18n csv file.
i have the same behaviour with an template. I copied the code for the error to my serializer to get my problem.
As soon as i switch to de_DE and regenerate my static code via
sudo php bin/magento setup:static-content:deploy de_DE --jobs=0 -f
it throws "Malformed UTF-8 characters, possibly incorrectly encoded".
So i looked up the files i changed in the template folder (i.e. code/Mytheme/Bannerslider/i18n/de_DE.csv) and downloaded them via WinSCP. Notepad++ showed "Ansii Encoding" - hard it i used "magento i18n:collect-phrases" for the translation file to create.
magento2dev # encguess app/code/MyTheme/Bannerslider/i18n/de_DE.csv
app/code/MyTheme/Bannerslider/i18n/de_DE.csv US-ASCII
magento2dev # locale
LANG=de_DE.UTF-8
......
So i changed the files manually in Notepad++, uploaded them, deployed the static content and reset all permissions - en voila it works.
So, the bug could be in your i18n csv file.
edited Jul 2 '18 at 10:34
Teja Bhagavan Kollepara
2,94841847
2,94841847
answered Dec 7 '17 at 15:50
Lord_PinheadLord_Pinhead
461
461
add a comment |
add a comment |
As I can see this error comes from the method:
/**
* Saving data cache
*
* @return $this
*/
protected function _saveCache()
{
$this->_cache->save($this->getSerializer()->serialize($this->getData()), $this->getCacheId(true), , false);
return $this;
}
and serializer which is not found comes from the method:
/**
* Get serializer
*
* @return MagentoFrameworkSerializeSerializerInterface
* @deprecated 100.2.0
*/
private function getSerializer()
{
if ($this->serializer === null) {
$this->serializer = MagentoFrameworkAppObjectManager::getInstance()
->get(SerializeSerializerInterface::class);
}
return $this->serializer;
}
The preference for the SerializerInterface
was added since 2.2.x version of the Magento, and declared in the app/etc/di.xml:
<preference for="MagentoFrameworkSerializeSerializerInterface" type="MagentoFrameworkSerializeSerializerJson" />
So I think your cache is old or the preference for the SerializerInterface
is not working. Try to debug this issue by calling the MagentoFrameworkSerializeSerializerInterface
(using dependency injection) somwhere in code, and check which class returned by di:
public function __construct(MagentoFrameworkSerializeSerializerInterface $serializer)
{
echo get_class($serializer);
}
If it returns not an instance of the MagentoFrameworkSerializeSerializerJson
class returned - try to search this overwritten preference in the project and remove it.
If you are working on the remote server - firstly check the app/etc/di.xml
file on the server directly.
Another way you can temporarly modify the core Json
serializer and check which error returned:
Open the magento/framework/Serialize/Serializer/Json.php
and change this method from:
/**
* {@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;
}
to:
/**
* {@inheritDoc}
* @since 100.2.0
*/
public function serialize($data)
{
$result = json_encode($data);
if (false === $result) {
switch (json_last_error()) {
case JSON_ERROR_NONE:
$error = ' - No errors';
break;
case JSON_ERROR_DEPTH:
$error = ' - Maximum stack depth exceeded';
break;
case JSON_ERROR_STATE_MISMATCH:
$error = ' - Underflow or the modes mismatch';
break;
case JSON_ERROR_CTRL_CHAR:
$error = ' - Unexpected control character found';
break;
case JSON_ERROR_SYNTAX:
$error = ' - Syntax error, malformed JSON';
break;
case JSON_ERROR_UTF8:
$error = ' - Malformed UTF-8 characters, possibly incorrectly encoded';
break;
default:
$error = ' - Unknown error';
break;
}
throw new InvalidArgumentException('Unable to serialize value. Error: ' . $error);
}
return $result;
}
Then you can see after the exception message a json error. May be your data is broken. keep in mind that all the old data should be unserialized and serialized using json in the setup upgrade scripts during magento update.
PS: do not forget to revert back the core files after debugging complete! The better way is use xDebug for that purpose.
1
You should make that debugger-helper a core patch -- or suggest they use SAFE PHP github.com/thecodingmachine/safe
– Alex
Dec 11 '18 at 12:37
add a comment |
As I can see this error comes from the method:
/**
* Saving data cache
*
* @return $this
*/
protected function _saveCache()
{
$this->_cache->save($this->getSerializer()->serialize($this->getData()), $this->getCacheId(true), , false);
return $this;
}
and serializer which is not found comes from the method:
/**
* Get serializer
*
* @return MagentoFrameworkSerializeSerializerInterface
* @deprecated 100.2.0
*/
private function getSerializer()
{
if ($this->serializer === null) {
$this->serializer = MagentoFrameworkAppObjectManager::getInstance()
->get(SerializeSerializerInterface::class);
}
return $this->serializer;
}
The preference for the SerializerInterface
was added since 2.2.x version of the Magento, and declared in the app/etc/di.xml:
<preference for="MagentoFrameworkSerializeSerializerInterface" type="MagentoFrameworkSerializeSerializerJson" />
So I think your cache is old or the preference for the SerializerInterface
is not working. Try to debug this issue by calling the MagentoFrameworkSerializeSerializerInterface
(using dependency injection) somwhere in code, and check which class returned by di:
public function __construct(MagentoFrameworkSerializeSerializerInterface $serializer)
{
echo get_class($serializer);
}
If it returns not an instance of the MagentoFrameworkSerializeSerializerJson
class returned - try to search this overwritten preference in the project and remove it.
If you are working on the remote server - firstly check the app/etc/di.xml
file on the server directly.
Another way you can temporarly modify the core Json
serializer and check which error returned:
Open the magento/framework/Serialize/Serializer/Json.php
and change this method from:
/**
* {@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;
}
to:
/**
* {@inheritDoc}
* @since 100.2.0
*/
public function serialize($data)
{
$result = json_encode($data);
if (false === $result) {
switch (json_last_error()) {
case JSON_ERROR_NONE:
$error = ' - No errors';
break;
case JSON_ERROR_DEPTH:
$error = ' - Maximum stack depth exceeded';
break;
case JSON_ERROR_STATE_MISMATCH:
$error = ' - Underflow or the modes mismatch';
break;
case JSON_ERROR_CTRL_CHAR:
$error = ' - Unexpected control character found';
break;
case JSON_ERROR_SYNTAX:
$error = ' - Syntax error, malformed JSON';
break;
case JSON_ERROR_UTF8:
$error = ' - Malformed UTF-8 characters, possibly incorrectly encoded';
break;
default:
$error = ' - Unknown error';
break;
}
throw new InvalidArgumentException('Unable to serialize value. Error: ' . $error);
}
return $result;
}
Then you can see after the exception message a json error. May be your data is broken. keep in mind that all the old data should be unserialized and serialized using json in the setup upgrade scripts during magento update.
PS: do not forget to revert back the core files after debugging complete! The better way is use xDebug for that purpose.
1
You should make that debugger-helper a core patch -- or suggest they use SAFE PHP github.com/thecodingmachine/safe
– Alex
Dec 11 '18 at 12:37
add a comment |
As I can see this error comes from the method:
/**
* Saving data cache
*
* @return $this
*/
protected function _saveCache()
{
$this->_cache->save($this->getSerializer()->serialize($this->getData()), $this->getCacheId(true), , false);
return $this;
}
and serializer which is not found comes from the method:
/**
* Get serializer
*
* @return MagentoFrameworkSerializeSerializerInterface
* @deprecated 100.2.0
*/
private function getSerializer()
{
if ($this->serializer === null) {
$this->serializer = MagentoFrameworkAppObjectManager::getInstance()
->get(SerializeSerializerInterface::class);
}
return $this->serializer;
}
The preference for the SerializerInterface
was added since 2.2.x version of the Magento, and declared in the app/etc/di.xml:
<preference for="MagentoFrameworkSerializeSerializerInterface" type="MagentoFrameworkSerializeSerializerJson" />
So I think your cache is old or the preference for the SerializerInterface
is not working. Try to debug this issue by calling the MagentoFrameworkSerializeSerializerInterface
(using dependency injection) somwhere in code, and check which class returned by di:
public function __construct(MagentoFrameworkSerializeSerializerInterface $serializer)
{
echo get_class($serializer);
}
If it returns not an instance of the MagentoFrameworkSerializeSerializerJson
class returned - try to search this overwritten preference in the project and remove it.
If you are working on the remote server - firstly check the app/etc/di.xml
file on the server directly.
Another way you can temporarly modify the core Json
serializer and check which error returned:
Open the magento/framework/Serialize/Serializer/Json.php
and change this method from:
/**
* {@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;
}
to:
/**
* {@inheritDoc}
* @since 100.2.0
*/
public function serialize($data)
{
$result = json_encode($data);
if (false === $result) {
switch (json_last_error()) {
case JSON_ERROR_NONE:
$error = ' - No errors';
break;
case JSON_ERROR_DEPTH:
$error = ' - Maximum stack depth exceeded';
break;
case JSON_ERROR_STATE_MISMATCH:
$error = ' - Underflow or the modes mismatch';
break;
case JSON_ERROR_CTRL_CHAR:
$error = ' - Unexpected control character found';
break;
case JSON_ERROR_SYNTAX:
$error = ' - Syntax error, malformed JSON';
break;
case JSON_ERROR_UTF8:
$error = ' - Malformed UTF-8 characters, possibly incorrectly encoded';
break;
default:
$error = ' - Unknown error';
break;
}
throw new InvalidArgumentException('Unable to serialize value. Error: ' . $error);
}
return $result;
}
Then you can see after the exception message a json error. May be your data is broken. keep in mind that all the old data should be unserialized and serialized using json in the setup upgrade scripts during magento update.
PS: do not forget to revert back the core files after debugging complete! The better way is use xDebug for that purpose.
As I can see this error comes from the method:
/**
* Saving data cache
*
* @return $this
*/
protected function _saveCache()
{
$this->_cache->save($this->getSerializer()->serialize($this->getData()), $this->getCacheId(true), , false);
return $this;
}
and serializer which is not found comes from the method:
/**
* Get serializer
*
* @return MagentoFrameworkSerializeSerializerInterface
* @deprecated 100.2.0
*/
private function getSerializer()
{
if ($this->serializer === null) {
$this->serializer = MagentoFrameworkAppObjectManager::getInstance()
->get(SerializeSerializerInterface::class);
}
return $this->serializer;
}
The preference for the SerializerInterface
was added since 2.2.x version of the Magento, and declared in the app/etc/di.xml:
<preference for="MagentoFrameworkSerializeSerializerInterface" type="MagentoFrameworkSerializeSerializerJson" />
So I think your cache is old or the preference for the SerializerInterface
is not working. Try to debug this issue by calling the MagentoFrameworkSerializeSerializerInterface
(using dependency injection) somwhere in code, and check which class returned by di:
public function __construct(MagentoFrameworkSerializeSerializerInterface $serializer)
{
echo get_class($serializer);
}
If it returns not an instance of the MagentoFrameworkSerializeSerializerJson
class returned - try to search this overwritten preference in the project and remove it.
If you are working on the remote server - firstly check the app/etc/di.xml
file on the server directly.
Another way you can temporarly modify the core Json
serializer and check which error returned:
Open the magento/framework/Serialize/Serializer/Json.php
and change this method from:
/**
* {@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;
}
to:
/**
* {@inheritDoc}
* @since 100.2.0
*/
public function serialize($data)
{
$result = json_encode($data);
if (false === $result) {
switch (json_last_error()) {
case JSON_ERROR_NONE:
$error = ' - No errors';
break;
case JSON_ERROR_DEPTH:
$error = ' - Maximum stack depth exceeded';
break;
case JSON_ERROR_STATE_MISMATCH:
$error = ' - Underflow or the modes mismatch';
break;
case JSON_ERROR_CTRL_CHAR:
$error = ' - Unexpected control character found';
break;
case JSON_ERROR_SYNTAX:
$error = ' - Syntax error, malformed JSON';
break;
case JSON_ERROR_UTF8:
$error = ' - Malformed UTF-8 characters, possibly incorrectly encoded';
break;
default:
$error = ' - Unknown error';
break;
}
throw new InvalidArgumentException('Unable to serialize value. Error: ' . $error);
}
return $result;
}
Then you can see after the exception message a json error. May be your data is broken. keep in mind that all the old data should be unserialized and serialized using json in the setup upgrade scripts during magento update.
PS: do not forget to revert back the core files after debugging complete! The better way is use xDebug for that purpose.
answered Nov 24 '17 at 10:00
Siarhey UchukhlebauSiarhey Uchukhlebau
9,44692757
9,44692757
1
You should make that debugger-helper a core patch -- or suggest they use SAFE PHP github.com/thecodingmachine/safe
– Alex
Dec 11 '18 at 12:37
add a comment |
1
You should make that debugger-helper a core patch -- or suggest they use SAFE PHP github.com/thecodingmachine/safe
– Alex
Dec 11 '18 at 12:37
1
1
You should make that debugger-helper a core patch -- or suggest they use SAFE PHP github.com/thecodingmachine/safe
– Alex
Dec 11 '18 at 12:37
You should make that debugger-helper a core patch -- or suggest they use SAFE PHP github.com/thecodingmachine/safe
– Alex
Dec 11 '18 at 12:37
add a comment |
I've ran in the same issue with the upgrade to 2.2.1. I found this articel to be very helpful
http://devdocs.magento.com/guides/v2.2/ext-best-practices/tutorials/serialized-to-json-data-upgrade.html
Data stored in the DB should not be serialized anymore, it should now be saved as a JSON object.
Most modules make a data update that unserializes the data in the DB and stores it again under a JSON format. (BTW It took quite a while to run this...)
Hence, if one of your modules saves data that is serialized in the DB that data might not be readable by Magento anymore, you will need to make a data upgrade Setup file. Also, it might be a 3rd party module that needs to be updated to a 2.2+ compatible version.
If you do serialize on unserialize data anywhere in your code you might have to change that as well.
I hope this gives you a better insight at what's causing this error.
Cheers!
Make sure to read the Release Notes for 2.2.1, lots has changed, including the path for thegeneration
folder. ;)
– drew7721
Nov 24 '17 at 19:58
add a comment |
I've ran in the same issue with the upgrade to 2.2.1. I found this articel to be very helpful
http://devdocs.magento.com/guides/v2.2/ext-best-practices/tutorials/serialized-to-json-data-upgrade.html
Data stored in the DB should not be serialized anymore, it should now be saved as a JSON object.
Most modules make a data update that unserializes the data in the DB and stores it again under a JSON format. (BTW It took quite a while to run this...)
Hence, if one of your modules saves data that is serialized in the DB that data might not be readable by Magento anymore, you will need to make a data upgrade Setup file. Also, it might be a 3rd party module that needs to be updated to a 2.2+ compatible version.
If you do serialize on unserialize data anywhere in your code you might have to change that as well.
I hope this gives you a better insight at what's causing this error.
Cheers!
Make sure to read the Release Notes for 2.2.1, lots has changed, including the path for thegeneration
folder. ;)
– drew7721
Nov 24 '17 at 19:58
add a comment |
I've ran in the same issue with the upgrade to 2.2.1. I found this articel to be very helpful
http://devdocs.magento.com/guides/v2.2/ext-best-practices/tutorials/serialized-to-json-data-upgrade.html
Data stored in the DB should not be serialized anymore, it should now be saved as a JSON object.
Most modules make a data update that unserializes the data in the DB and stores it again under a JSON format. (BTW It took quite a while to run this...)
Hence, if one of your modules saves data that is serialized in the DB that data might not be readable by Magento anymore, you will need to make a data upgrade Setup file. Also, it might be a 3rd party module that needs to be updated to a 2.2+ compatible version.
If you do serialize on unserialize data anywhere in your code you might have to change that as well.
I hope this gives you a better insight at what's causing this error.
Cheers!
I've ran in the same issue with the upgrade to 2.2.1. I found this articel to be very helpful
http://devdocs.magento.com/guides/v2.2/ext-best-practices/tutorials/serialized-to-json-data-upgrade.html
Data stored in the DB should not be serialized anymore, it should now be saved as a JSON object.
Most modules make a data update that unserializes the data in the DB and stores it again under a JSON format. (BTW It took quite a while to run this...)
Hence, if one of your modules saves data that is serialized in the DB that data might not be readable by Magento anymore, you will need to make a data upgrade Setup file. Also, it might be a 3rd party module that needs to be updated to a 2.2+ compatible version.
If you do serialize on unserialize data anywhere in your code you might have to change that as well.
I hope this gives you a better insight at what's causing this error.
Cheers!
answered Nov 24 '17 at 19:57
drew7721drew7721
433310
433310
Make sure to read the Release Notes for 2.2.1, lots has changed, including the path for thegeneration
folder. ;)
– drew7721
Nov 24 '17 at 19:58
add a comment |
Make sure to read the Release Notes for 2.2.1, lots has changed, including the path for thegeneration
folder. ;)
– drew7721
Nov 24 '17 at 19:58
Make sure to read the Release Notes for 2.2.1, lots has changed, including the path for the
generation
folder. ;)– drew7721
Nov 24 '17 at 19:58
Make sure to read the Release Notes for 2.2.1, lots has changed, including the path for the
generation
folder. ;)– drew7721
Nov 24 '17 at 19:58
add a comment |
I ended up to exactly to the same situation. After adding the code above I got "Malformed UTF-8 characters, possibly incorrectly encoded"
I suppose that you are not using the default language. Try to change language to "default" en_US.
Meetanshi - Which language you are using in front-end and is the static-content creation also failing?
Hi @A.P, I am facing the same error and i am using de_DE language.
– Meetanshi
Dec 3 '17 at 10:28
Try change to en_US. Table core_config_data (general/locale/code) to en_US
– A.P
Dec 3 '17 at 10:45
same error after changing to en_US.
– Meetanshi
Dec 3 '17 at 10:54
I managed to get it up, but dead-end when trying get back to fi_FI. Did you cleared the cache?
– A.P
Dec 3 '17 at 11:02
yes, i cleared cache
– Meetanshi
Dec 3 '17 at 11:03
|
show 1 more comment
I ended up to exactly to the same situation. After adding the code above I got "Malformed UTF-8 characters, possibly incorrectly encoded"
I suppose that you are not using the default language. Try to change language to "default" en_US.
Meetanshi - Which language you are using in front-end and is the static-content creation also failing?
Hi @A.P, I am facing the same error and i am using de_DE language.
– Meetanshi
Dec 3 '17 at 10:28
Try change to en_US. Table core_config_data (general/locale/code) to en_US
– A.P
Dec 3 '17 at 10:45
same error after changing to en_US.
– Meetanshi
Dec 3 '17 at 10:54
I managed to get it up, but dead-end when trying get back to fi_FI. Did you cleared the cache?
– A.P
Dec 3 '17 at 11:02
yes, i cleared cache
– Meetanshi
Dec 3 '17 at 11:03
|
show 1 more comment
I ended up to exactly to the same situation. After adding the code above I got "Malformed UTF-8 characters, possibly incorrectly encoded"
I suppose that you are not using the default language. Try to change language to "default" en_US.
Meetanshi - Which language you are using in front-end and is the static-content creation also failing?
I ended up to exactly to the same situation. After adding the code above I got "Malformed UTF-8 characters, possibly incorrectly encoded"
I suppose that you are not using the default language. Try to change language to "default" en_US.
Meetanshi - Which language you are using in front-end and is the static-content creation also failing?
answered Dec 2 '17 at 7:40
A.PA.P
264
264
Hi @A.P, I am facing the same error and i am using de_DE language.
– Meetanshi
Dec 3 '17 at 10:28
Try change to en_US. Table core_config_data (general/locale/code) to en_US
– A.P
Dec 3 '17 at 10:45
same error after changing to en_US.
– Meetanshi
Dec 3 '17 at 10:54
I managed to get it up, but dead-end when trying get back to fi_FI. Did you cleared the cache?
– A.P
Dec 3 '17 at 11:02
yes, i cleared cache
– Meetanshi
Dec 3 '17 at 11:03
|
show 1 more comment
Hi @A.P, I am facing the same error and i am using de_DE language.
– Meetanshi
Dec 3 '17 at 10:28
Try change to en_US. Table core_config_data (general/locale/code) to en_US
– A.P
Dec 3 '17 at 10:45
same error after changing to en_US.
– Meetanshi
Dec 3 '17 at 10:54
I managed to get it up, but dead-end when trying get back to fi_FI. Did you cleared the cache?
– A.P
Dec 3 '17 at 11:02
yes, i cleared cache
– Meetanshi
Dec 3 '17 at 11:03
Hi @A.P, I am facing the same error and i am using de_DE language.
– Meetanshi
Dec 3 '17 at 10:28
Hi @A.P, I am facing the same error and i am using de_DE language.
– Meetanshi
Dec 3 '17 at 10:28
Try change to en_US. Table core_config_data (general/locale/code) to en_US
– A.P
Dec 3 '17 at 10:45
Try change to en_US. Table core_config_data (general/locale/code) to en_US
– A.P
Dec 3 '17 at 10:45
same error after changing to en_US.
– Meetanshi
Dec 3 '17 at 10:54
same error after changing to en_US.
– Meetanshi
Dec 3 '17 at 10:54
I managed to get it up, but dead-end when trying get back to fi_FI. Did you cleared the cache?
– A.P
Dec 3 '17 at 11:02
I managed to get it up, but dead-end when trying get back to fi_FI. Did you cleared the cache?
– A.P
Dec 3 '17 at 11:02
yes, i cleared cache
– Meetanshi
Dec 3 '17 at 11:03
yes, i cleared cache
– Meetanshi
Dec 3 '17 at 11:03
|
show 1 more comment
In my case the cause to a UTF8 Encoding problem, was non-multibyte safe shortening of product names:
$productName = strlen($productName) > 60 ? substr($productName,0,60)."..." :
$productName;
So a
012345678901234567890123456789012345678901234567890123456 Außengewinde
became
012345678901234567890123456789012345678901234567890123456 Au�...
add a comment |
In my case the cause to a UTF8 Encoding problem, was non-multibyte safe shortening of product names:
$productName = strlen($productName) > 60 ? substr($productName,0,60)."..." :
$productName;
So a
012345678901234567890123456789012345678901234567890123456 Außengewinde
became
012345678901234567890123456789012345678901234567890123456 Au�...
add a comment |
In my case the cause to a UTF8 Encoding problem, was non-multibyte safe shortening of product names:
$productName = strlen($productName) > 60 ? substr($productName,0,60)."..." :
$productName;
So a
012345678901234567890123456789012345678901234567890123456 Außengewinde
became
012345678901234567890123456789012345678901234567890123456 Au�...
In my case the cause to a UTF8 Encoding problem, was non-multibyte safe shortening of product names:
$productName = strlen($productName) > 60 ? substr($productName,0,60)."..." :
$productName;
So a
012345678901234567890123456789012345678901234567890123456 Außengewinde
became
012345678901234567890123456789012345678901234567890123456 Au�...
edited Dec 11 '18 at 12:50
answered Dec 11 '18 at 12:44
AlexAlex
9,4381553113
9,4381553113
add a comment |
add a comment |
For me the solution was to replace all special characters like "ä" in the translation csv file with html versions of the same character like this:
ä
Then I cleared caches and reloaded frontend.
add a comment |
For me the solution was to replace all special characters like "ä" in the translation csv file with html versions of the same character like this:
ä
Then I cleared caches and reloaded frontend.
add a comment |
For me the solution was to replace all special characters like "ä" in the translation csv file with html versions of the same character like this:
ä
Then I cleared caches and reloaded frontend.
For me the solution was to replace all special characters like "ä" in the translation csv file with html versions of the same character like this:
ä
Then I cleared caches and reloaded frontend.
answered 49 mins ago
WebninjaWebninja
5611929
5611929
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f202448%2fmagento-2-2-1-unable-to-serialize-value%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Hi, I am talking about serialize value not unseriaize value.
– Meetanshi
Nov 21 '17 at 6:19
Have you tried clearing the cache ? not only Magento cache, external caches too if any .
– MGento
Nov 21 '17 at 6:22
yes, i have tried.
– Meetanshi
Nov 21 '17 at 6:23
Can you try to find out, what data you are trying to serialize ? Try traversing through your third party modules and find out, from which module, this error is triggered. You may probably need to override the serialize function, in the file /vendor/magento/framework/Serialize/Serializer/Json.php
– MGento
Nov 21 '17 at 8:51
Is this error happening during the DB update or after you've updated the DB to 2.2.1?
– drew7721
Nov 24 '17 at 19:48