Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.2.4 build 3060 - 10 December 2019.
    Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

    See the Wiki for downloading either version.

    Website Trends

    Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.

    Moderator: mcrossley

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

    Website Trends

    Post by rich27gc » Mon 19 Jan 2015 7:15 pm

    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: 1558
    Joined: Sat 13 Aug 2011 9:33 am
    Weather Station: WH1081
    Operating System: Windows 7 64bit HP SP1
    Location: Somewhere in the USA
    Contact:

    Re: Website Trends

    Post by water01 » Mon 19 Jan 2015 9:36 pm

    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.

    User avatar
    PaulMy
    Posts: 2009
    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 » Mon 19 Jan 2015 10:01 pm

    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: 74
    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 » Mon 19 Jan 2015 10:16 pm

    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: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Website Trends

    Post by steve » Tue 20 Jan 2015 8:15 am

    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: 74
    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 » Tue 20 Jan 2015 8:24 am

    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: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Website Trends

    Post by steve » Tue 20 Jan 2015 8:52 am

    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: 74
    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 » Tue 20 Jan 2015 9:46 am

    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: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Website Trends

    Post by steve » Tue 20 Jan 2015 9:49 am

    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: 5806
    Joined: Thu 07 Jan 2010 9:44 pm
    Weather Station: Davis VP2
    Operating System: Stretch Lite rPi
    Location: Wilmslow, Cheshire, UK
    Contact:

    Re: Website Trends

    Post by mcrossley » Tue 20 Jan 2015 10:08 am

    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: 74
    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 » Tue 20 Jan 2015 12:18 pm

    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: 74
    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 » Fri 23 Jan 2015 9:40 pm

    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