Page 1 of 1
Website Trends
Posted: Mon 19 Jan 2015 7:15 pm
by rich27gc
This one's been driving me crazy, I can't get the trends the display on my website, the page loads but no trends.
I've tried it in IE11 and chrome but no joy. I've used the "inspect elements" option in chrome and it says "Failed to load resource: the server responded with a status of 404 (Not Found)" "
http://www.shapweather.co.uk/cumulus/units.json".
Now I now the file is there because I've checked, but when I click on the link is says "404 file not found" which is what it's says!!
I googled Json files and it said something about MIME and something needs to be done by the web host.
Has anybody seen this before?
Re: Website Trends
Posted: Mon 19 Jan 2015 9:36 pm
by water01
But if you enter "
http://www.shapweather.co.uk/cumulus/units.json" as a url is says file not found so it isn't there.
Re: Website Trends
Posted: Mon 19 Jan 2015 10:01 pm
by PaulMy
I had a similar issue a couple of builds ago where I also got the same as with your
http://www.shapweather.co.uk/cumulus/trends.htm I can't recall exactly what I did but of what I recall it was an update path issue, and now the trends display. I suggest to double check your settings.
Paul
Re: Website Trends
Posted: Mon 19 Jan 2015 10:16 pm
by rich27gc
It's definitely there, and it's being updated
Re: Website Trends
Posted: Tue 20 Jan 2015 8:15 am
by steve
It looks like your web space provider doesn't allow .json files. Is it free hosting? You could ask them to handle them properly.
Re: Website Trends
Posted: Tue 20 Jan 2015 8:24 am
by rich27gc
No it's not free hosting, I use 123-Reg.
You're probably right, I've just tried renaming units.json to units.txt using filezilla and when I enter the url
http://www.shapweather.co.uk/cumulus/units.txt I can access the file.
Re: Website Trends
Posted: Tue 20 Jan 2015 8:52 am
by steve
You could try changing the script to look for the changed name, but I suspect it won't get parsed correctly. And the data files are also .json so the graphs presumably wouldn't work anyway. Broken web hosting is a pain.
Re: Website Trends
Posted: Tue 20 Jan 2015 9:46 am
by rich27gc
Contacted 123-reg support and they added a "web.config" file to my web space enabling the mimeType for .json files.
Trends now working
Re: Website Trends
Posted: Tue 20 Jan 2015 9:49 am
by steve
Excellent, well done 123-reg. I use them for all my domain registrations, but not for hosting, and I've always found them to be pretty good.
Re: Website Trends
Posted: Tue 20 Jan 2015 10:08 am
by mcrossley
For reference, if you don't get any joy from the hosting provider...
If your host runs Apache, then you 'should' be able to add the json MIME type via a .htaccess file entry (if it is enabled).
Add the line:
Re: Website Trends
Posted: Tue 20 Jan 2015 12:18 pm
by rich27gc
steve wrote:Excellent, well done 123-reg. I use them for all my domain registrations, but not for hosting, and I've always found them to be pretty good.
Yes, total time from registering the problem to fixing it was 45mins, you can't fault that
Re: Website Trends
Posted: Fri 23 Jan 2015 9:40 pm
by rich27gc
If anybody else has the same problem then make a file called web.config containing the following : -
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
</system.webServer>
</configuration>
Upload to the /web/contents/ directory of your website