I have a Magento CE 2.0.7 install on Apache with PHP7 and MySQL 5.7. There are no plugins or modified/custom code. I set the locale to en_CA on installation through the web setup wizard.

I changed to production mode and the frontend directs to the proper pub/static/frontend/Magento/luma/en_CA/ directory but the backend/admin section points to pub/static/adminhtml/Magento/backend/en_US/ causing a 404 as that does not exist. The proper en_CA directory is in the file system with the proper permissions set but the admin side is requesting the en_US directory.

Has anyone else experienced this issue or have a resolution?

  • well did you create a backend theme en_CA? it sounds like it defaults to the en_US as it is expected – Claudiu Creanga Jun 13 '16 at 13:18
  • I did not create a backend theme. There have been no modifications. When changing to production mode the static content is deployed under en_CA but when going to the admin in a browser the request is sent to en_US. Shouldn't the backend point to en_CA the same as the frontend? – omantric Jun 13 '16 at 14:33
  • no, it shouldn't be, unless you create a backend theme – Claudiu Creanga Jun 13 '16 at 14:45
  • Okay. So to fix this, static content must be deployed with the locale option for en_US. For anyone else that runs into this issue the command to run would be "bin/magento setup:static-content:deploy en_US" – omantric Jun 13 '16 at 15:03

As discussed in the comments on the original post, the backend will only request from en_CA(or a locale other than en_US) if there is a backend theme.

To have the CSS/JS working correctly on the backend the static content of the en_US locale must be deployed. The following command will do this.

bin/magento setup:static-content:deploy
  • en_US is implied and can be removed – Claudiu Creanga Jun 13 '16 at 16:04

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.