1

I know so many others have asked the same question but still no reliable ans is available.

Suddenly my site is hitting the wrong path of static content (CSS/JS/IMAGES) because of this my site is not loading.

static path is adding version140*****

Same problem discussed in this question

But still same problem is there for my custom CSS still url is wrong.

pub/static/version1487328792/frontend/Magento/luma/en_US/Codilar_RenderBook/css/style.css.

Version part is getting added automatically.

  • I have the same problem with this one. – MazeStricks Apr 27 '17 at 6:49
7

This is due to Magento "Signing" the files. Essentially it forces Magento to regenerate the public static files on page reload by adding the current timestamp to the files.

This may have changed due to an upgrade of version so check the following configuration is set to no:

Store -> Configuration -> Developer -> Static Files Settings -> Sign Static Files

Be sure to flush the caches after this has been changed

4

I tried EVERYTHING to no avail, so I finally decided to do it the "wrong" way:

<Magento-base-URL>/vendor/magento/module-theme/Model/Url/Signature.php

Commented out line 66

$baseUrl .= $this->renderUrlSignature() . '/';

After that the admin loaded fine and I checked the "signage" setting. It was still set to "YES" although I had set it to "0" in the database - maybe wrong scope or whatever.

Then I uncommented line 66 back in and it still works fine.

4 hours of my life gone, hope this helps somebody else.

  • You saved me about 4 hours of my life. – primo Aug 5 '17 at 9:56
  • it does helps me :) – Vincent Teyssier Jul 12 at 5:34
1

If you keep the pub/static/.htaccess file in developer mode you don't need to run any compilation command: Magento will create symlinks to files as soon as they are requested. That means that changes to static assets will be visible immediately, provided you also have cache disabled.

You can delete the pub/static/frontend or pub/static/adminhtml instead.

In default mode assets are materialized in pub/static subfolder, meaning they are created (copied, not symlinked) at first request. If you modify them you have to flush the cache to have them updated.

In production mode assets are not materialized (causing 404 HTTP error upon request) until you run the php bin/magento setup:static-content:deploy command.

  • what about the version14****** which is getting added in static content url – Mohammad Mujassam Feb 17 '17 at 11:33
  • just delete .htaccess file remove then check .htaccess generate or not if not then issue remian.. – Magento2 Devloper Feb 17 '17 at 11:39
  • removed pub/static/.htaccess issue remains same (.htaccess is not generating) after I put .htaccess manually all css/js is loading properly except my modules css/js (version14******** getting added in it). – Mohammad Mujassam Feb 17 '17 at 11:48
  • More detail please Refer this article..magento.stackexchange.com/questions/94502/… – Magento2 Devloper Feb 17 '17 at 11:54

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.