SlavaYurthev / Contact-M2

Extended Contact Form Extension for Magento 2.x
11 stars 3 forks source link

Configuration option returns error after install #1

Open markdimi opened 6 years ago

markdimi commented 6 years ago

Just installed the module and I have this error when choosing configuration:

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

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

Thank you for your efforts

SlavaYurthev commented 6 years ago

try to make this config https://github.com/SlavaYurthev/Contact-M2/blob/master/etc/config.xml#L23 empty, i will discover this issue...

markdimi commented 6 years ago

What do you mean empty? When I tried your module I was using 2.2.2. Now I am using 2.2.5 - Any chance it might be fixed?

SlavaYurthev commented 6 years ago

<fields></fields> or <!--<fields></fields>--> it may be help

amenk commented 6 years ago
 | sy_contact/general/fields                                     | default | 0        | a:2:{s:18:"_1506991973917_917";a:4:{s:3:"key";s:5:"email";s:5:"label";s:6:"E-Mail";s:11:"field_class";s:23:"required validate-email";s:10:"field_type";s:5:"email";}s:18:"_1506991977533_533";a:4:{s:3:"key";s:7:"message";s:5:"label";s:7:"Message";s:11:"field_class";s:8:"required";s:10:"field_type";s:8:"textarea";}} |

This is ending up in the config databaes, seems to be double ...

amenk commented 6 years ago

Making the entry empty and n98-magerun2 config:store:get "sy"

seems to help

amenk commented 6 years ago

When saving stuff from the backend, I get also unserialize problems in the frontend.

I am using Magento 2.2.6

Exception #0 (Exception): Notice: unserialize(): Error at offset 0 of 381 bytes in /home/amk/local-workspace/shop.example.com/vendor/sy/contact/Block/ContactForm.php on line 19

amenk commented 6 years ago

You (or Magento 2.2.6) seem to save , but use unserialize :D ?

amenk commented 6 years ago

Will provide a PR ...

amenk commented 6 years ago

@SlavaYurthev I realized that in dev-master you already fixed it. 0.1.0-fix is not picked up by composer. you should tag 0.1.1 - then you can close this issue I would say :)

DevOli commented 6 years ago

I have the same problem. How can I update to the correct "tag" using composer command. Thank you.

amenk commented 6 years ago

use composer require with version dev-master