Important

Okay
  Public Ticket #1415080
2.2.2 compatibility issue
Closed

Comments

  • Yasuhiro started the conversation

    We are trying to upgrade from Magento 2.1.9 to 2.2.2 with the "command line upgrade" method. At the setup:di:compile phase, I am getting this error:

    Errors during compilation:
        Ves\BaseWidget\Model\Config\Reader
            Incompatible argument type: Required type: string. Actual type: array; File: app/code/Ves/BaseWidget/Model/Config/Reader.php

    We are using 3 VES extensions:

    1. Mega Menu (version 2.1.0_2), Order #100001241, Order Date: August 22, 2016
    2. Image Slider, Order #100001916, Order Date: October 10, 2016
    3. Page Builder, Order #100003029, Order Date: December 20, 2016

    I am not sure which one of these is responsible for the error on BaseWidget/Model/Config/Reader.php

    To finish the 2.2.2 core upgrade, I would like to download the latest versions of all these 3 extensions. However, the downloads are NOT available when I logged in to my account page on your web site.

    Please provide the latest versions. If there is a download page, please let me know.

  •   Land of replied privately
  • Yasuhiro replied
     

    Hello,

    Thanks to the updated codes from the latest versions of VES Megamenu and VES PageBuilde, the PHP error on the Reader.php got solved.


    Then, I had to manually fix one line of VES ProductSlider file.

    The setup:di:compile command showed layout XML errors. I had to modify line# 39 of app/code/Ves/Productlist/view/frontend/layout/default.xml

    From: 

    <block class="\\Magento\Framework\View\Element\Template" name="ves.productlist.ajax" template="Ves_Productlist::ajax/js.phtml"/>

    To:

    <block class="Magento\Framework\View\Element\Template" name="ves.productlist.ajax" template="Ves_Productlist::ajax/js.phtml"/> 

    I had to remove the "\\" from the beginning of the attribute value for the "class" attribute. After this change, the setup:di:compile completed without any errors, and I could finish all the rest of the bin/magento commands for Magento core upgrade process.

    Now, when I open my home page, this text message is displayed where the MegaMenu used to be displayed:

     Error filtering template: Unable to unserialize value. 

    Also, on the admin page, I see this Notice: unserialize() errors, when I go to [CONTENT] => [Widgets] under Elements section => and click any of the widget listed.

    The error message this:

    1 exception(s):
    Exception #0 (Exception): Notice: unserialize(): Error at offset 0 of 1262 bytes in app/code/Ves/Productlist/Model/Magento/Widget/Instance.php on line 35 Exception #0 (Exception): Notice: unserialize(): Error at offset 0 of 1262 bytes in app/code/Ves/Productlist/Model/Magento/Widget/Instance.php on line 35
    #0 [internal function]: Magento\Framework\App\ErrorHandler->handler(8, 'unserialize(): ...', '/Applications/M...', 35, Array)
    #1 app/code/Ves/Productlist/Model/Magento/Widget/Instance.php(35): unserialize('{"title":"","ad...')
    #2 vendor/magento/module-widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php(102): Ves\Productlist\Model\Magento\Widget\Instance->getWidgetParameters()
    #3 vendor/magento/framework/View/Element/AbstractBlock.php(272): Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Properties->_preparelayout()
    #4 vendor/magento/framework/View/Layout/Generator/Block.php(150): Magento\Framework\View\Element\AbstractBlock->setLayout(Object(Magento\Framework\View\Layout\Interceptor))
    #5 vendor/magento/framework/View/Layout/GeneratorPool.php(80): Magento\Framework\View\Layout\Generator\Block->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
    #6 vendor/magento/framework/View/Layout.php(344): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
    #7 vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout->generateElements()
    #8 vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
    #9 vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
    #10 vendor/magento/framework/View/Page/Config.php(197): Magento\Framework\View\Layout\Builder->build()
    #11 vendor/magento/framework/View/Page/Config.php(207): Magento\Framework\View\Page\Config->build()
    #12 vendor/magento/framework/App/View.php(170): Magento\Framework\View\Page\Config->publicBuild()
    #13 vendor/magento/framework/App/View.php(114): Magento\Framework\App\View->loadLayoutUpdates()
    #14 vendor/magento/module-widget/Controller/Adminhtml/Widget/Instance.php(79): Magento\Framework\App\View->loadLayout()
    #15 vendor/magento/module-widget/Controller/Adminhtml/Widget/Instance/Edit.php(24): Magento\Widget\Controller\Adminhtml\Widget\Instance->_initAction()
    #16 vendor/magento/framework/App/Action/Action.php(107): Magento\Widget\Controller\Adminhtml\Widget\Instance\Edit->execute()
    #17 vendor/magento/module-backend/App/AbstractAction.php(229): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
    #18 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
    #19 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Widget\Controller\Adminhtml\Widget\Instance\Edit\Interceptor->___callParent('dispatch', Array)
    #20 vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Widget\Controller\Adminhtml\Widget\Instance\Edit\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
    #21 vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Widget\Controller\Adminhtml\Widget\Instance\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    #22 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Widget\Controller\Adminhtml\Widget\Instance\Edit\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
    #23 generated/code/Magento/Widget/Controller/Adminhtml/Widget/Instance/Edit/Interceptor.php(26): Magento\Widget\Controller\Adminhtml\Widget\Instance\Edit\Interceptor->___callPlugins('dispatch', Array, NULL)
    #24 vendor/magento/framework/App/FrontController.php(55): Magento\Widget\Controller\Adminhtml\Widget\Instance\Edit\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
    #25 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
    #26 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
    #27 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
    #28 generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
    #29 vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
    #30 vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
    #31 index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
    #32 {main}

    Is there a way to fix this error?


    Thank you,

    Yasuhiro Nakano

  • Yasuhiro replied

    Let me attach the screenshots of the reported bugs on my previous post.

  •  1,315
    Land of replied

    Hello Yasuhiro,

    Have a nice day!

    The problem of product list extension, please resolve it by edit the file "app/code/Ves/Productlist/etc/di.xml" then find code:

    <preference for="Magento\Widget\Model\Widget\Instance" type="Ves\Productlist\Model\Magento\Widget\Instance" />

    comment or remove it.

    Then run commands:

    php bin/magento setup:upgrade --keep-generated

    php bin/magento cache:clean

  • Yasuhiro replied

    Hello,


    Thank you for the update on "app/code/Ves/Productlist/etc/di.xml", the PHP error on the Widget admin page is fixed now.

    I figured out the error on the MegaMenu showing this error message:

     Error filtering template: Unable to unserialize value. 

    It was NOT from the code. It was caused by values in the DB.

    It was the first menu item on the MegaMenu. It was [New Arrivals] menu, and it had the Catalog Products List widget on the Main Content. I guess the Catalog Products List widget got changed along the Magento core upgrades, and it was causing the template filtering error.

    When I deleted [New Arrivals] menu item and re-created, the menu started to work normally.


    Thank you for the support,

    Yasuhiro Nakano

  •  1,315
    Land of replied

    Hello Yasuhiro,

    Have a nice day!

    The problem because magento 2.2.2 was changed the serialize data of widget shortcodes. The old widget shortcodes which have serialize data from old magento 2 can not use on magento 2.2.x. We should delete the widget shortcode and add it again to resolve issue.