- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
js-translation.json :404 Not Found
I install Magento 2 on IIS 7, it is working good, but on home page and all other pages including admin panel a JavaScript error occurred
the error is :
NetworkError: 404 Not Found - http://localhost:8080/pub/static/frontend/Magento/luma/en_US/js-translation.json" SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data $.mage.translate.add(JSON.parse(string));
then I explore location
/pub/static/frontend/Magento/luma/en_US/
and found that the file is there when open the file it is contain just two square bracket [].
i dont know why magento show that file is not found, because it is already there
I already delete folders in pub/static directory and then re-run the deploy command from cmd
php bin/magento setup:static-content:deploy
but it is not work for me.
is magento support IIS 7 ?
is problem occurred due to iis ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: js-translation.json :404 Not Found
First of all, Magento does not support the top-level domains (like "localhost").
Use a second-level domain, e.g. localhost.com.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: js-translation.json :404 Not Found
Hi dmitry,
thanks for fast replay
i delete my old magento store and setup with new magento store with second level domain.
but still problem is not fixed, but another issue arise my admin penal stopped work.!
now the error look like
NetworkError: 404 Not Found - http://www.m2.com/pub/static/frontend/Magento/luma/en_US/js-translation.json" SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data $.mage.translate.add(JSON.parse(string));
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: js-translation.json :404 Not Found
What does your server return on the «http://www.m2.com/pub/static/frontend/Magento/luma/en_US/js-translation.json» HTTP request?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: js-translation.json :404 Not Found
its return me to my local website which is run on port 80 and domain in localhost named m2.com
actually i add 127.0.0.1 m2.com in
C:\Windows\System32\drivers\etc\hosts
files
then in IIS
i set binding settings like following
port : 80
host name : m2.com
then i run the http://m2.com/ and its return me to my website in localhost with path
and still getting the error
NetworkError: 404 Not Found - http://m2.com/pub/static/frontend/Magento/luma/en_US/js-translation.json