1

After Update magento 2.2.0 i am getting below error

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

Element 'css', attribute 'order': The attribute 'order' is not allowed.
Line: 53

Element 'css', attribute 'order': The attribute 'order' is not allowed.
Line: 54


Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'css', attribute 'order': The attribute 'order' is not allowed.
Line: 52

Element 'css', attribute 'order': The attribute 'order' is not allowed.
Line: 53

Element 'css', attribute 'order': The attribute 'order' is not allowed.
Line: 54

#0 /vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('__construct('createObject('Magento\\Framewo...', Array)
#3 /vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#4 /vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#5 /vendor/magento/framework/View/Model/Layout/Update/Validator.php(125): Magento\Framework\Config\DomFactory->createDom(Array)
#6 /vendor/magento/framework/View/Model/Layout/Merge.php(461): Magento\Framework\View\Model\Layout\Update\Validator->isValid('_validateMergedLayout('LAYOUT_frontend...', '\n   load(Array)
#9 /vendor/magento/framework/View/Layout/Builder.php(86): Magento\Framework\View\Model\Layout\Merge\Interceptor->load()
#10 /vendor/magento/framework/View/Layout/Builder.php(63): Magento\Framework\View\Layout\Builder->loadLayoutUpdates()
#11 /vendor/magento/framework/View/Layout.php(254): Magento\Framework\View\Layout\Builder->build()
#12 /vendor/magento/framework/View/Layout.php(875): Magento\Framework\View\Layout->build()
#13 /generated/code/Magento/Framework/View/Layout/Interceptor.php(414): Magento\Framework\View\Layout->getBlock('page_content_he...')
#14 /vendor/magento/module-cms/Helper/Page.php(171): Magento\Framework\View\Layout\Interceptor->getBlock('page_content_he...')
#15 /vendor/magento/module-cms/Controller/Index/Index.php(43): Magento\Cms\Helper\Page->prepareResultPage(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'home')
#16 /generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(24): Magento\Cms\Controller\Index\Index->execute(NULL)
#17 /vendor/magento/framework/App/Action/Action.php(107): Magento\Cms\Controller\Index\Index\Interceptor->execute()
#18 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Cms\Controller\Index\Index\Interceptor->___callParent('dispatch', Array)
#20 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#21 /generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(39): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#22 /vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#24 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#25 /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 /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 /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 /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 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#30 /generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#31 /vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#32 /vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#33 /index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#34 {main}
1

Remove order in css like

<css src="Vendor_MOdule::css/owl.transitions.css" media="all" order="999"/>

replace

<css src="Vendor_MOdule::css/owl.transitions.css" media="all" />

Hope it work for you

  • do you have any idea if i want to change order of css then how can we do that? – Navin Bhudiya Oct 26 '17 at 17:08
  • @NavinBhudiya Currently i am working on this issue when i got solution i will share ASAP – Sagar Dobariya Oct 28 '17 at 3:59
  • @SagarDobariya have you found the alternative for order attribute? – Priya Ponnusamy Nov 11 '17 at 7:33
1

There is an issue on this topic ( https://github.com/magento/magento2/issues/12188 ). I included a patch in a comment. In the same time, I opened a pull request ( https://github.com/magento/magento2/pull/12235 ) to fix this issue.

The patch : Here is a patch that can be installed with the help cweagans/composer-patches library. Create a file Patch-Magento_Framework-M2.2.0-the-attribute-order-is-not-allowed.patch in the patches folder in the Magento root directory with the following content.

--- View/Layout/etc/head.xsd
+++ View/Layout/etc/head.xsd
@@ -19,6 +19,7 @@
         <xs:attribute name="target" type="xs:string"/>
         <xs:attribute name="type" type="xs:string"/>
         <xs:attribute name="src_type" type="xs:string"/>
+        <xs:attribute name="order" type="xs:string"/>
     </xs:complexType>

     <xs:complexType name="metaType">

In composer.json append :

"extra": {
    "patches": {
        "magento/framework": {
            "Fix: https://github.com/magento/magento2/issues/12188": "patches/Patch-Magento_Framework-M2.2.0-the-attribute-order-is-not-allowed.patch"
        }
    },
    "magento-force": "override"
}

Run a composer update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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