Update 2.1.2 -> 2.1.3 - requirejs-config.js and some other js are not loading. On the error console can see the following error message,
"NetworkError: 404 Not Found - http://magento2.docker/static/version1481810946/_requirejs/frontend/Magento/Luma/en_GB/requirejs-config.js"
The resource from “http://magento2.docker/static/version1481810946/_requirejs/frontend/Magento/Luma/en_GB/requirejs-config.js” was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff).
Same for several other javascripts.
Guess the issue is,
I am using nginx server and I dont have the static/version rewrite rule in place for the conf.
dont have the dev/static/sign settings in core_config_data as it is never set
and Versioning of static files (including CSS, JS, font, and image files) is now enabled by default from 2.1.3
I have the same problem with the latest Magento version and using nginx in a docker container.
I think you can get this fixed by adding the below on nginx conf
# Remove signature of the static files that is used to overcome the browser cache
location ~ ^/static/version {
rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
}
or by adding 'dev/static/sign' as 0 on the core_config_data table
Thanks @sanutryzens , it works!
UPDATE: I am not able to consistently reproduce this issue, so redacting this comment.
~I am experiencing a similar issue on a Magento site that I just upgraded from 2.1.2 to 2.1.3. The site is running in developer mode.~
~I have the "Sign Static Files" option set to "No".~
~If I run the bin/magento setup:static-content:deploy command, the problem goes away.~
It was fixed in 2.1.0 - commit
Sample Nginx config.
Closing the issue as it was fixed by PR https://github.com/magento/magento2/pull/2323
Most helpful comment
I think you can get this fixed by adding the below on nginx conf
# Remove signature of the static files that is used to overcome the browser cache location ~ ^/static/version { rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last; }or by adding 'dev/static/sign' as 0 on the core_config_data table