0

After updating Magento to 2.2.0 with command line I got the following errors and then a whole list of files: How to fix?

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): 
Element 'page': This element is not expected. Expected is one of ( attribute, block, referenceBlock, referenceContainer, container, move, uiComponent ).
Line: 806


Exception #0 (Magento\Framework\Config\Dom\ValidationException): 
Element 'page': This element is not expected. Expected is one of ( attribute, block, referenceBlock, referenceContainer, container, move, uiComponent ).
Line: 806

#0 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')
#1 /home/cosmotol/domains/cosmotology.nl/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/cosmotol/...', '%message%\nLine:...')
#2 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#3 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#4 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#5 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/View/Model/Layout/Update/Validator.php(125): Magento\Framework\Config\DomFactory->createDom(Array)
#6 /home/cosmotol/domains/cosmotology.nl/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/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/View/Model/Layout/Merge.php(442): Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout('LAYOUT_frontend...', '<!--\r\n    <refe...')
#8 /home/cosmotol/domains/cosmotology.nl/public_html/generated/code/Magento/Framework/View/Model/Layout/Merge/Interceptor.php(193): Magento\Framework\View\Model\Layout\Merge->load(Array)
#9 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/View/Layout/Builder.php(86): Magento\Framework\View\Model\Layout\Merge\Interceptor->load()
#10 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/View/Layout/Builder.php(63): Magento\Framework\View\Layout\Builder->loadLayoutUpdates()
#11 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/View/Layout.php(254): Magento\Framework\View\Layout\Builder->build()
#12 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/View/Layout.php(875): Magento\Framework\View\Layout->build()
#13 /home/cosmotol/domains/cosmotology.nl/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(414): Magento\Framework\View\Layout->getBlock('page_content_he...')
#14 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/module-cms/Helper/Page.php(171): Magento\Framework\View\Layout\Interceptor->getBlock('page_content_he...')
#15 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/module-cms/Controller/Index/Index.php(43): Magento\Cms\Helper\Page->prepareResultPage(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'home')
#16 /home/cosmotol/domains/cosmotology.nl/public_html/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(24): Magento\Cms\Controller\Index\Index->execute(NULL)
#17 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/App/Action/Action.php(107): Magento\Cms\Controller\Index\Index\Interceptor->execute()
#18 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Cms\Controller\Index\Index\Interceptor->___callParent('dispatch', Array)
#20 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#21 /home/cosmotol/domains/cosmotology.nl/public_html/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(39): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#22 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#24 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#25 /home/cosmotol/domains/cosmotology.nl/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))
#26 /home/cosmotol/domains/cosmotology.nl/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))
#27 /home/cosmotol/domains/cosmotology.nl/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))
#28 /home/cosmotol/domains/cosmotology.nl/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))
#29 /home/cosmotol/domains/cosmotology.nl/public_html/app/code/Infortis/Cgen/Plugin/Magento/Framework/App/FrontController.php(32): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#30 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Infortis\Cgen\Plugin\Magento\Framework\App\FrontController->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#31 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#32 /home/cosmotol/domains/cosmotology.nl/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#33 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#34 /home/cosmotol/domains/cosmotology.nl/public_html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#35 /home/cosmotol/domains/cosmotology.nl/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#36 {main}

2 Answers 2

0

This is a consequence of the validation working as expected in Magento 2.2, which it didn't in earlier versions. Refer to this issue on Github or this.

The solution is to find the xml that is not following the definition. Often, this is a plugin, and a simple solution could be to update them to the latest available version.

To allow a better answer, please post more of the exception log.

2
  • I've pasted more of the exception log now. I don't know where to look for the problem.
    – Rad Factor
    Jan 7, 2018 at 18:34
  • Which version of ultimo do you have? Jan 8, 2018 at 22:39
0

You should search all XML layout files for "page" nodes in the layout folder for all extensions you have:

/app/code/{vendor}/{module}/view/frontend/layout/

And search all layout folders in your theme module overrides:

/app/design/frontend/{vendor}/{theme}/{module}/layout/

You should be looking for a "page" node which isn't properly opened and closed.

A proper example is:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
...
</page>

Most probably there's a typo in one of the files, for example a missing opening or closing "<", ">" or "/", like this:

page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.