0

After upgrading magento 2.2, this error occurs while opening category pages

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer', attribute 'class': The attribute 'class' is not allowed.
Line: 925


Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer', attribute 'class': The attribute 'class' is not allowed.
Line: 925

#0 /home/adventure/public_html/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')
#1 /home/adventure/public_html/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/adventure...', '%message%\nLine:...')
#2 /home/adventure/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#3 /home/adventure/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...', Array)
#4 /home/adventure/public_html/vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#5 /home/adventure/public_html/vendor/magento/framework/View/Model/Layout/Update/Validator.php(125): Magento\Framework\Config\DomFactory->createDom(Array)
#6 /home/adventure/public_html/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/adventure/public_html/vendor/magento/framework/View/Model/Layout/Merge.php(442): Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout('LAYOUT_frontend...', '<body>\n   <refe...')
#8 /home/adventure/public_html/vendor/magento/framework/View/Layout/Builder.php(86): Magento\Framework\View\Model\Layout\Merge->load()
#9 /home/adventure/public_html/vendor/magento/framework/View/Layout/Builder.php(63): Magento\Framework\View\Layout\Builder->loadLayoutUpdates()
#10 /home/adventure/public_html/vendor/magento/framework/View/Page/Config.php(197): Magento\Framework\View\Layout\Builder->build()
#11 /home/adventure/public_html/vendor/magento/framework/View/Page/Config.php(509): Magento\Framework\View\Page\Config->build()
#12 /home/adventure/public_html/vendor/magento/framework/View/Page/Config.php(467): Magento\Framework\View\Page\Config->getElementAttribute('body', 'class')
#13 /home/adventure/public_html/app/code/Sm/ShopBy/Controller/Category/View.php(205): Magento\Framework\View\Page\Config->addBodyClass('page-products')
#14 /home/adventure/public_html/vendor/magento/framework/App/Action/Action.php(107): Sm\ShopBy\Controller\Category\View->execute()
#15 /home/adventure/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#16 /home/adventure/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Sm\ShopBy\Controller\Category\View\Interceptor->___callParent('dispatch', Array)
#17 /home/adventure/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Sm\ShopBy\Controller\Category\View\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#18 /home/adventure/public_html/generated/code/Sm/ShopBy/Controller/Category/View/Interceptor.php(26): Sm\ShopBy\Controller\Category\View\Interceptor->___callPlugins('dispatch', Array, Array)
#19 /home/adventure/public_html/vendor/magento/framework/App/FrontController.php(55): Sm\ShopBy\Controller\Category\View\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#20 /home/adventure/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /home/adventure/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#22 /home/adventure/public_html/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/adventure/public_html/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/adventure/public_html/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))
#25 /home/adventure/public_html/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/adventure/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /home/adventure/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#28 /home/adventure/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#29 /home/adventure/public_html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#30 /home/adventure/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#31 {main}

Please ,give solution as soon as possible

3
  • Remove your custom theme and check with default luma theme? If it's still not working properly then disable the custom module and check.
    – Nits
    May 25, 2018 at 10:20
  • This is not a bug, those attributes are not allowed when using referenceBlock and you should locate them in your code a remove them. May 25, 2018 at 10:39
  • Refer the answer you can help for same. magento.stackexchange.com/questions/281010/… Jul 9, 2019 at 13:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.