I created a theme in magento 2.0 that was working. Now, I updated the magento version to 2.1 and deployed the theme. The files get generated in pub/static folder but CSS files are not loading in head section. I am loading the CSS files as below:

default_head_blocks.xml

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

        <css src="css/test.css" />
        <css src="css/owl.carousel.css" />
        <link src="js/owl.carousel.js"/> 

    </head>
</page>
  • 2
    Try this app/design/frontend/theme/web/css/test.css. I also face same problem after this it's working for me – Magento 2 Aug 22 '16 at 11:54
  • @Kothari do you understand the question? – Qaisar Satti Aug 22 '16 at 11:55
  • Oh Sorry @Qaisar Satti No Idea – Magento 2 Aug 22 '16 at 11:56
  • plz show your xml file – Rakesh Jesadiya Aug 22 '16 at 12:05
  • 1
    Have you keep above file at proper location? may be you have forgot to put file at proper location – Rakesh Jesadiya Aug 22 '16 at 12:15
up vote 7 down vote accepted

I was facing the same problem and did the following steps to fix it

  1. First make a backup of your theme from app/design/frontend/theme
  2. Set the blank theme from admin->content->configurations for your store
  3. delete the theme from admin->themes->your-theme
  4. also delete it form folder app/design/frontend/theme
  5. then run upgrade and deploy commands.
  6. then place your theme again in folder app/design/frontend/theme
  7. run upgrade command.
  8. select your theme from admin->content->configurations->your-theme for your store.
  9. and run deploy command.

Hope it will work for you also.

  • Is possible magento 2.0.0 theme fot magento 2.1.7? – zus Mar 26 at 5:51
  • @Qaisar Satti AFter applied the theme the screen look like snag.gy/25jdHU.jpg – zus Mar 26 at 5:53
  • @zus you need to deploy theme content just follow blog.qaisarsatti.com/magento_2/… – Qaisar Satti Mar 26 at 5:59
  • @QaisarSatti Still not working, may i know the proper way to import magento 2 themes. – zus Mar 26 at 6:08
  • @zus the problem you showing is image is related to static content. for import the data of custom theme. there will be configuration for that. – Qaisar Satti Mar 26 at 6:11

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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