0

My custom theme is not loading the compiled Less CSS file. In the theme layout XML, I am loading the CSS files as below in 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/responsive.css" />
 <css src="css/custom.css" />
 <link src="js/custom.js"/> 
</head>

then I have a custom.less file also. In my local everything is fine. But when I pushed my code to the production server and run all the setup: upgrade, indexer, static deploy commands this "custom.css" file is not loading. The files get generated in pub/static folder but CSS files are not loading in head section.

Only upto responsive.css is loading in Head section. the custom.css and custom.js are not loading.

Anyone knows what is the reason and how to solve this?

Teja Bhagavan Kollepara
3,8275 gold badges33 silver badges69 bronze badges
asked Aug 23, 2017 at 6:15

1 Answer 1

1

My above Issue is fixed. The solution was to change the theme type from virtual (1) to physical (0) in database "theme" table. After that flush the cache.

answered Sep 5, 2017 at 6:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.