0

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.

enter image description here

1
  • Try sudo a2enmod rewrite then systemctl reload apache2 Commented Jan 14, 2020 at 13:48

4 Answers 4

1

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.

answered Jan 26, 2020 at 1:02
1

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
answered Sep 23, 2024 at 12:32
0

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

answered Jan 14, 2020 at 13:48
3
  • Doesn't seem to work, "AllowOverride All" has already been set, any other ideas? Commented Jan 21, 2020 at 13:09
  • check permission for /pub/static/adminhtml , /pub/static/frontend also check /var/cache , /var/view_preprocessed Commented 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_US Commented Jan 26, 2020 at 0:59
0

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

answered Jun 26 at 15:30

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.