Domanda

Js, CSS is not loading properly. enter image description here

È stato utile?

Soluzione 3

I solved this problem by running:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

Altri suggerimenti

Please check mod_rewrite enabled in your server and also check the directory symlinks like this in your server.

Open /etc/apache2/apache2.conf 

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

please check it pub/static/ inside htaccess exits or not same path pub/media/ inside check it after all command apply it

This could be an issue with symlinks. I see that deploy.php worked for you, but you may also try deleting the resources from pub/static and seeing if the instructions from https://magento.stackexchange.com/a/64808/594 work for you. If so, then it may save you some time during development as it should be faster than running deploy.php.

I hope this will help

Another thing to check is any speed optimizer modules. I didn't notice my client had one called MagePow Speedoptimizer and it sneakily was moving the require.js from loading in the head section to the body which doesn't work well at all, so I disabled it.

There are other speedoptimizer modules too for Magento 2 that can cause this.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top