On the Admin Login css/js is not loading, I don't have this problem anywhere else on my site. How can i solve this? I did
bin/magento setup:static-content:deploy
bin/magento, bin/magento setup:upgrade
cleared my cache multiple times but it's not working.
4 Answers 4
I found the issue, for some reason the js/css was linked to the 'en_GB' store instead of en_US.
Because of this the css didn't load, you can change it in the database core_config data, set general/locale/code to the preferred store.
We had the same issue, and it seems it especially occurs when your locale is not en_US. We can solve an issue by just adding locale code while executing the static content deploy command. For example, if the locale is nl_NL then execute the below command.
php bin/magento s:s:d -f nl_NL
You just need to update the apache2.conf file.
/etc/apache2/apache2.conf
Navigate to the place in the apache2.conf file.Change "AllowOverride None" to "AllowOverride All" Save the file.
Enabled mod_rewrite:
sudo a2enmod rewrite
sudo service apache2 restart
-
Doesn't seem to work, "AllowOverride All" has already been set, any other ideas?Jorden Di Egidio– Jorden Di Egidio2020年01月21日 13:09:38 +00:00Commented Jan 21, 2020 at 13:09
-
check permission for /pub/static/adminhtml , /pub/static/frontend also check /var/cache , /var/view_preprocessedHafiz Arslan– Hafiz Arslan2020年01月22日 10:44:27 +00:00Commented Jan 22, 2020 at 10:44
-
Found the issue, for some reason the css/js was linked to the en_GB store instead of en_USJorden Di Egidio– Jorden Di Egidio2020年01月26日 00:59:28 +00:00Commented Jan 26, 2020 at 0:59
If your current locale is, for example, en_GB, you should deploy static content specifically for that locale:
php bin/magento setup:static-content:deploy en_GB -f
You can replace en_GB with any other locale like nl_NL, fr_FR, de_DE, etc., depending on your store/admin configuration.
php bin/magento setup:static-content:deploy en_US en_GB nl_NL -f
sudo a2enmod rewritethensystemctl reload apache2