Important

Okay
  Public Ticket #1491237
Magento 2 Lazy Load -
Closed

Comments

  • Jose Luis started the conversation

    Hi

    I have Magento 2 version 2.2.3, and install the module 

    "Magento 2 Lazy Load"

    After that in backoffice all is ok, but in frontende i have that error:

    1 exception(s):
    Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'css': This element is not expected.
    Line: 155
    Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'css': This element is not expected.
    Line: 155
    #0 /home/momentco/public_html/teste/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')
    #1 /home/momentco/public_html/teste/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('<layout xmlns:x...', Object(Magento\Framework\App\Arguments\ValidationState), Array, NULL, '/home/momentco/...', '%message%\nLine:...')
    #2 /home/momentco/public_html/teste/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
    #3 /home/momentco/public_html/teste/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...', Array)
    #4 /home/momentco/public_html/teste/vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
    #5 /home/momentco/public_html/teste/vendor/magento/framework/View/Model/Layout/Update/Validator.php(141): Magento\Framework\Config\DomFactory->createDom(Array)
    #6 /home/momentco/public_html/teste/vendor/magento/framework/View/Model/Layout/Merge.php(461): Magento\Framework\View\Model\Layout\Update\Validator->isValid('<layout xmlns:x...', 'layout_merged', false)
    #7 /home/momentco/public_html/teste/vendor/magento/framework/View/Model/Layout/Merge.php(442): Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout('LAYOUT_frontend...', '<body>\n   <refe...')
    #8 /home/momentco/public_html/teste/vendor/magento/framework/View/Layout/Builder.php(86): Magento\Framework\View\Model\Layout\Merge->load()
    #9 /home/momentco/public_html/teste/vendor/magento/framework/View/Layout/Builder.php(63): Magento\Framework\View\Layout\Builder->loadLayoutUpdates()
    #10 /home/momentco/public_html/teste/vendor/magento/framework/View/Layout.php(254): Magento\Framework\View\Layout\Builder->build()
    #11 /home/momentco/public_html/teste/vendor/magento/framework/View/Layout.php(875): Magento\Framework\View\Layout->build()
    #12 /home/momentco/public_html/teste/vendor/magento/module-cms/Helper/Page.php(171): Magento\Framework\View\Layout->getBlock('page_content_he...')
    #13 /home/momentco/public_html/teste/vendor/magento/module-cms/Controller/Index/Index.php(43): Magento\Cms\Helper\Page->prepareResultPage(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'home')
    #14 /home/momentco/public_html/teste/vendor/magento/framework/App/Action/Action.php(107): Magento\Cms\Controller\Index\Index->execute()
    #15 /home/momentco/public_html/teste/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
    #16 /home/momentco/public_html/teste/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Cms\Controller\Index\Index\Interceptor->___callParent('dispatch', Array)
    #17 /home/momentco/public_html/teste/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
    #18 /home/momentco/public_html/teste/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(26): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
    #19 /home/momentco/public_html/teste/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
    #20 /home/momentco/public_html/teste/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
    #21 /home/momentco/public_html/teste/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
    #22 /home/momentco/public_html/teste/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))
    #23 /home/momentco/public_html/teste/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))
    #24 /home/momentco/public_html/teste/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
    #25 /home/momentco/public_html/teste/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))
    #26 /home/momentco/public_html/teste/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
    #27 /home/momentco/public_html/teste/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
    #28 /home/momentco/public_html/teste/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
    #29 /home/momentco/public_html/teste/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
    #30 /home/momentco/public_html/teste/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
    #31 {main}
    Can u helpe me?
    Thanks a Lot


  •  1,319
    Land of replied

    Hello Jose Luis,

    Please download my attach file, then upload it into the folder "app/code/Lof/All/view/frontend/layout/"

    Then run commands:

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

    php bin/magento cache:clean



  • Jose Luis replied

    Hi

    I test your solution and know don't have a error.


    Thanks a Lot, the problem is solved.


    Best regards,

    José Luís Coelho

  •  1,319
    Land of replied

    You are welcome!

    Have a nice day!