2

I have just followed the installation steps

Have configured my nginx conf exactly as per mage docs guide (to include the nginx.conf.sample file in my nginx site's conf file)

Magento has installed OK, but when I view the backend, the CSS is not loading (very bare HTML + links loading).

When I view the HTML for the page, I can see it is trying to load file eg: http://helloworld.dev/static/version1504621364/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css

However, on my server there is no folder 'version1504621364' ...

I have come across this page but not finding it very helpful especially since I am using nginx rather than apache.

I have also already run: php bin/magento setup:static-content:deploy

Also have tried putting system into production / developer mode ... nothing working ...

No luck (neither front nor backend)... not sure why magento is throwing in that version1504621364 folder when requesting the CSS (or how to disable / fix it in either magento config / nginx config?)

any help much appreciated, g

OS: Mac OS X sierra nginx PHP 7

0

To remove the version in your path:

Login to the admin and navigate to stores > config > advanced > developer > static file settings and change Sign Static Files to no.

  • Thanks Ben but when I get to that page, I change setting to 'No' and when I hit the 'save config' button, nothing happens (wonder if the JS required for this button to work is also not loading maybe?) – gvanto Sep 6 '17 at 6:17
  • ok yes submitting form manually with browser's console works ... backend CSS seems to be back. However frontend CSS still not loading ... – gvanto Sep 6 '17 at 6:47
  • That sounded like a weird admin issue. Have you flushed caches? And is the version number still in the path? – Ben Crook Sep 6 '17 at 8:08
0

The version1504621364 is a way of Magento cache busting static files in the browser, when ever there is a deploy of static files there is a new number, and so every browser that has a cached version of the old styles and js will know to grab a new one when they hit the site. There is no directory called version1504621364, there is a text file that lives in the pub/static folder called deployed-version.txt that has this number in it. The catch is that your .htaccess file uses this file to route the browser correctly to your files.

You can then see the problems, since you are using nginx. But, disabling the signing of static files should disable this. If you are still getting the version1504621364 in your css and js path, then this is a cache issue. Clear the cache and see if it's still not showing up. But default when you install Magento 2 the cache is turned on. So you have to clear if after most changes on the site.

If that doesn't work, what is the path to your css and js now?

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.