1

I have Magento 2.1.4 and recently attempted to upgrade an extension but afterwards whenever I deploy the static content, it loses the CSS/JS on the front and backends.

php bin/magento setup:static-content:deploy

I have noticed that the path to my CSS is for example (I have turned the versioning folder thing off)...

/pub/static/frontend/mytheme/themename/en_GB/css/styles-l.css

However when I look for the folder above, en_BG does not exist. It is 'en_US' instead.

The same sort of behaviour is the same for the backend. The path to the CSS says...

/pub/static/adminhtml/Magento/backend/en_US/css/styles.css

But when I look for that file, 'en_US' does not exist. 'en_GB' exists instead.

If I just rename the folders and make sure they exist it works fine, but my question is why would this be happenning?

The site is setup to be en_GB (United Kingdom)

Thanks

  • Do you have grunt installed? Or someway to compile the less files? – Rebel Mar 1 '17 at 16:51
  • I dont unfortunately - if I could set that up can you tell me what/where I should be looking? Thanks – Richard Laws Mar 2 '17 at 10:16
  • Our normal routine consist of using grunt to compile the css/less files and then we use the di:compilers. Check this link for some more helpful information. [link]devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/… – Rebel Mar 2 '17 at 17:25
0

Please follow these commands

cd var
rm -rf *
cd ../pub/static/
rm -rf *
cd ../..
php bin/magento setup:static-content:deploy en_GB en_US

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.