1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'css': This element is not expected. Line: 542 facing this issue in 2.2.5.
I have upgraded from Magento 2.1.9 to Magento 2.2.5 version.
Please help me guys.
The node 'css' should be wrapped inside 'head' as below.
<head>
<css src="Lof_All::css/fix_magento2.css" />
</head>
Check File:
(assuming the theme is within app/design/frontend/
)
grep -r -i --include \*.xml '<css/meta/link..' app/design/frontend/
Check DB/Admin:
Check admin Layout XML Update: any <css/meta/link...>content outside ..
The error is showing because there is layout file which has a node. you should check your custom theme's Magento_Theme/layout/default.xml file if you have any css node, ( also check your default_heads_block.xml file if you have added any custom css file ) if you don't fine any then check layout of specific page where this error is showing.
if you are using linux / ssh ( run this command it would find and list the file where this is added / declared )
grep -r -i --include \*.xml '<css' app/design/frontend/