Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidArgumentException / serialize #21

Closed
ghost opened this issue Dec 5, 2017 · 1 comment
Closed

InvalidArgumentException / serialize #21

ghost opened this issue Dec 5, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 5, 2017

I just installed the latest version of Baseprice 1.1.1 on Magento 2.2.1 with:
wget https://github.com/Magenerds/BasePrice/archive/1.1.1.tar.gz
tar xvzf 1.1.1.tar.gz
mv BasePrice-1.1.1 /var/www/mydomain.de/app/code/Magenerds/BasePrice
./bin/magento setup:upgrade

After going to the admin backend and selecting Magenerds -> Baseprice i get:

1 exception(s):
Exception #0 (InvalidArgumentException): Unable to unserialize value.

Exception #0 (InvalidArgumentException): Unable to unserialize value.
#0 /var/www/mydomain.de/vendor/magento/module-config/Model/Config/Backend/Serialized.php(55): Magento\Framework\Serialize\Serializer\Json->unserialize('a:14:{i:0;a:3:{...')
#1 /var/www/mydomain.de/vendor/magento/framework/Model/AbstractModel.php(601): Magento\Config\Model\Config\Backend\Serialized->_afterLoad()
#2 /var/www/mydomain.de/generated/code/Magento/Config/Model/Config/Backend/Serialized/ArraySerialized/Interceptor.php(323): Magento\Framework\Model\AbstractModel->afterLoad()
#3 /var/www/mydomain.de/vendor/magento/module-config/Block/System/Config/Form.php(441): Magento\Config\Model\Config\Backend\Serialized\ArraySerialized\Interceptor->afterLoad()
#4 /var/www/mydomain.de/vendor/magento/module-config/Block/System/Config/Form.php(349): Magento\Config\Block\System\Config\Form->getFieldData(Object(Magento\Config\Model\Config\Structure\Element\Field\Interceptor), 'baseprice/gener...')
#5 /var/www/mydomain.de/vendor/magento/module-config/Block/System/Config/Form.php(325): Magento\Config\Block\System\Config\Form->_initElement(Object(Magento\Config\Model\Config\Structure\Element\Field\Interceptor), Object(Magento\Framework\Data\Form\Element\Fieldset), 'baseprice/gener...', '', '')
#6 /var/www/mydomain.de/vendor/magento/module-config/Block/System/Config/Form.php(265): Magento\Config\Block\System\Config\Form->initFields(Object(Magento\Framework\Data\Form\Element\Fieldset), Object(Magento\Config\Model\Config\Structure\Element\Group), Object(Magento\Config\Model\Config\Structure\Element\Section))
#7 /var/www/mydomain.de/vendor/magento/module-config/Block/System/Config/Form.php(211): Magento\Config\Block\System\Config\Form->_initGroup(Object(Magento\Config\Model\Config\Structure\Element\Group), Object(Magento\Config\Model\Config\Structure\Element\Section), Object(Magento\Framework\Data\Form))
#8 /var/www/mydomain.de/vendor/magento/module-config/Block/System/Config/Form.php(548): Magento\Config\Block\System\Config\Form->initForm()
#9 /var/www/mydomain.de/vendor/magento/framework/View/Element/AbstractBlock.php(666): Magento\Config\Block\System\Config\Form->_beforeToHtml()
#10 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml()
#11 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(534): Magento\Framework\View\Layout->_renderBlock('system\config\f...')
#12 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('system\config\f...')
#13 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('system\config\f...')
#14 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('system\config\f...', true)
#15 /var/www/mydomain.de/vendor/magento/framework/View/Element/AbstractBlock.php(507): Magento\Framework\View\Layout\Interceptor->renderElement('system\config\f...', true)
#16 /var/www/mydomain.de/vendor/magento/module-config/view/adminhtml/templates/system/config/edit.phtml(22): Magento\Framework\View\Element\AbstractBlock->getChildHtml('form')
#17 /var/www/mydomain.de/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/mydo...')
#18 /var/www/mydomain.de/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Config\Block\System\Config\Edit), '/var/www/mydo...', Array)
#19 /var/www/mydomain.de/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/var/www/mydo...')
#20 /var/www/mydomain.de/vendor/magento/module-backend/Block/Template.php(124): Magento\Framework\View\Element\Template->_toHtml()
#21 /var/www/mydomain.de/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Backend\Block\Template->_toHtml()
#22 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml()
#23 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(534): Magento\Framework\View\Layout->_renderBlock('system.config.e...')
#24 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('system.config.e...')
#25 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('system.config.e...')
#26 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('system.config.e...', true)
#27 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('system.config.e...')
#28 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('content')
#29 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('content')
#30 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content')
#31 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('content', true)
#32 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('content')
#33 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('admin.scope.col...')
#34 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('admin.scope.col...')
#35 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('admin.scope.col...')
#36 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('admin.scope.col...', true)
#37 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('admin.scope.col...')
#38 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('main.col')
#39 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main.col')
#40 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.col')
#41 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main.col', true)
#42 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('main.col')
#43 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('page.main.conta...')
#44 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.main.conta...')
#45 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.main.conta...')
#46 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.main.conta...', true)
#47 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.main.conta...')
#48 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('page.content')
#49 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.content')
#50 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.content')
#51 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.content', true)
#52 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.content')
#53 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('page.wrapper')
#54 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#55 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#56 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', true)
#57 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper')
#58 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('backend.page')
#59 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('backend.page')
#60 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('backend.page')
#61 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('backend.page', true)
#62 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('backend.page')
#63 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('root')
#64 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#65 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#66 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#67 /var/www/mydomain.de/vendor/magento/framework/View/Layout.php(954): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#68 /var/www/mydomain.de/generated/code/Magento/Framework/View/Layout/Interceptor.php(492): Magento\Framework\View\Layout->getOutput()
#69 /var/www/mydomain.de/vendor/magento/framework/View/Result/Page.php(257): Magento\Framework\View\Layout\Interceptor->getOutput()
#70 /var/www/mydomain.de/vendor/magento/framework/View/Result/Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#71 /var/www/mydomain.de/generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php(193): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#72 /var/www/mydomain.de/vendor/magento/framework/App/Http.php(139): Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#73 /var/www/mydomain.de/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#74 /var/www/mydomain.de/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#75 {main}

@sydekumf
Copy link
Contributor

sydekumf commented Dec 5, 2017

Yes, as the serialization mechanism changed in Magento for 2.2 it can not deserialized if you have already had a serialized configuration before and just updated the module.
I have to admit that we should have changed the version number accordingly, at least increased the minor version of the module.
A solution would be to delete the entry in the database and re-save it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant