I am working on M2 and I've set M2 developer mode. My site home page works fine but the other pages are not loading. They just show errors and warnings on inner pages.


enter image description here

  • you have to fix those mentioned errors – fmsthird Jul 24 at 9:48

Check layout of specific files in your module or theme 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/

Hope it Helps.

  • This error is showing on product detail page and also other inner pages. – Shoaib Saleem Jul 24 at 10:01
  • if you could post screenshot, that would be much better to understand or update it to your question. – Mohit Rane Jul 24 at 10:13
  • Screenshot is posted already. – Shoaib Saleem Jul 24 at 10:15
  • @ShoaibSaleem after using grep command – Mohit Rane Jul 24 at 10:17
  • also check the error logs – Mohit Rane Jul 24 at 10:24

This is likely an error on the theme XML files.

The <css> tag must only be located as child of the <head> tag.

I would suggest to run grep command to locate all the files with the <css> tag and look out for the tag's parent if its only under the <head>

You may refer to vendor/magento/framework/View/Layout/etc/head.xsd

to check what elements should be under the <head> tag

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.