Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.6.10 (build 3086) - 24 June 2020 (please see important announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

See the Wiki to download the software or click on the Downloads link in the Forum Banner.

Website Trends

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Post Reply
rich27gc
Posts: 75
Joined: Thu 08 Jul 2010 3:15 pm
Weather Station: WeatherDuino Pro2
Operating System: Raspbian
Location: Shap, Cumbria
Contact:

Website Trends

Post 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?

water01
Posts: 1913
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Website Trends

Post 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.
David
Image

User avatar
PaulMy
Posts: 2176
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Website Trends

Post 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

rich27gc
Posts: 75
Joined: Thu 08 Jul 2010 3:15 pm
Weather Station: WeatherDuino Pro2
Operating System: Raspbian
Location: Shap, Cumbria
Contact:

Re: Website Trends

Post by rich27gc »

water01 wrote: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.
It's definitely there, and it's being updated
You do not have the required permissions to view the files attached to this post.

User avatar
steve
Cumulus Author
Posts: 26704
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Website Trends

Post 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.
Steve

rich27gc
Posts: 75
Joined: Thu 08 Jul 2010 3:15 pm
Weather Station: WeatherDuino Pro2
Operating System: Raspbian
Location: Shap, Cumbria
Contact:

Re: Website Trends

Post 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.

User avatar
steve
Cumulus Author
Posts: 26704
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Website Trends

Post 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.
Steve

rich27gc
Posts: 75
Joined: Thu 08 Jul 2010 3:15 pm
Weather Station: WeatherDuino Pro2
Operating System: Raspbian
Location: Shap, Cumbria
Contact:

Re: Website Trends

Post 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 :)

User avatar
steve
Cumulus Author
Posts: 26704
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Website Trends

Post 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.
Steve

User avatar
mcrossley
Posts: 6581
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Website Trends

Post 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:

Code: Select all

AddType  application/json  json

rich27gc
Posts: 75
Joined: Thu 08 Jul 2010 3:15 pm
Weather Station: WeatherDuino Pro2
Operating System: Raspbian
Location: Shap, Cumbria
Contact:

Re: Website Trends

Post 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 :o

rich27gc
Posts: 75
Joined: Thu 08 Jul 2010 3:15 pm
Weather Station: WeatherDuino Pro2
Operating System: Raspbian
Location: Shap, Cumbria
Contact:

Re: Website Trends

Post 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

Post Reply