Page 18 of 21

Re: Reworked default websites

Posted: Sat 09 Nov 2024 2:51 pm
by wurzelmac
They aren't uploaded till now because this site is only for testal purposes for new CMX beta versions. After leaving the latest beta running a few hours I shut this instance of CMX down, so no uploads during the night. I am wondering about only the charts not working (except the NOAA's).

Re: Reworked default websites

Posted: Sat 09 Nov 2024 3:25 pm
by PaulMy
Hi.
Another thing, mybe someone can help me out this misery: On my Test-Website simply all things are working except charts:
https://wetter.unterwurzacher.at/Cumulu ... rends.html
this site is only for testal purposes for new CMX beta versions.
I am wondering about only the charts not working
Your live https://cumuluswetter.unterwurzacher.at ... achart.htm seems ok.
Doing an [F12] in Edge on your CumulusBeta site gives

Code: Select all

Expression
not available

charts.js:146 
 Uncaught TypeError: Cannot read properties of undefined (reading 'units')
    at doTemp (charts.js:146:29)
    at doSelect (charts.js:107:18)
    at Object.success (charts.js:141:3)
    at c (jquery.min.js:2:25266)
    at Object.fireWith [as resolveWith] (jquery.min.js:2:26015)
    at l (jquery.min.js:2:77721)
    at XMLHttpRequest.<anonymous> (jquery.min.js:2:80204)
    
My default site is working fine, including all the Charts.
Are all the files from your test \CumulusMX\webfiles uploaded to your CumulusBeta site?
Are all the settings in the test install the same as the live install?

Enjoy,
Paul

Re: Reworked default websites

Posted: Sat 09 Nov 2024 4:04 pm
by HansR
It seems you are missing graphconfig.json.

Re: Reworked default websites

Posted: Sat 09 Nov 2024 4:28 pm
by wurzelmac
Paul, yes all files are uploaded as far as I can see. I will doublecheck the settings again (done it often today).

Hans, graphconfig.json is present ( see https://wetter.unterwurzacher.at/Cumulu ... onfig.json ).

Thanks so far, lets look what tomorrow brings...

Re: Reworked default websites

Posted: Sun 10 Nov 2024 9:38 am
by NeilThomas
Hi all

After a long absence I have finally updated the alternative default website. You can upload it from
website.zip|here
.

If the zip contains a MAC folder, it can be discarded, I had to transfer the file to my Mac mini to compress it as zip isn;t working on my rPis at the moment.

There are only minor changes and corrections in this release.

I tried to upload it to the Wiki but that has changed and it is not obvious how to upload and link files.

Neil

Re: Reworked default websites

Posted: Sun 10 Nov 2024 9:43 am
by wurzelmac
Today I double-checked the files on the remote webserver, and all .json files are present in the CumulusBeta folder as they are in the running live CumulusMX folder. One file I noticed is not present in the Beta folder is upload.php, but I do not know what this file is doing in the live folder.

I also double checked the settings in the test install compared to the live install - they are the same except the target for the uploads (live uploads > CumulusMX - test uploads > CumulusBeta.

Out of curiosity I updated my live install to the latest Beta B4049, and the charts are working fine here ( for example https://cumuluswetter.unterwurzacher.at/trends.htm#temp ) with the "old" public default website.

I am running out of ideas, but as the latest Beta is running fine on my live instance of CMX I am happy with that.

Re: Reworked default websites

Posted: Sun 10 Nov 2024 9:48 am
by NeilThomas
wurzelmac wrote: Sun 10 Nov 2024 9:43 am Today I double-checked the files on the remote webserver, and all .json files are present in the CumulusBeta folder as they are in the running live CumulusMX folder. One file I noticed is not present in the Beta folder is upload.php, but I do not know what this file is doing in the live folder.

I also double checked the settings in the test install compared to the live install - they are the same except the target for the uploads (live uploads > CumulusMX - test uploads > CumulusBeta.

Out of curiosity I updated my live install to the latest Beta B4049, and the charts are working fine here ( for example https://cumuluswetter.unterwurzacher.at/trends.htm#temp ) with the "old" public default website.

I am running out of ideas, but as the latest Beta is running fine on my live instance of CMX I am happy with that.
Are you running the test system on your MAC or on something else. I run on an rPi and one thing that catches me out regularly is file permissions. I don't know if this is the same on a MAC but being UNIX based it might be.

Neil.

Re: Reworked default websites

Posted: Sun 10 Nov 2024 10:09 am
by wurzelmac
Neil, I am running both the test and the live install on a Mac mini - both dashboards are showing the charts correct. The problem is the web. On my live default website (running the old piblic website https://cumuluswetter.unterwurzacher.at/ ) I can see the charts, on my test default website (running the AI2 website https://wetter.unterwurzacher.at/CumulusBeta/ ) I cannot see the charts. Both websites are driven by CMX V430B4049. :roll:

Just noticed that you have done an update to AI2 - will try this one and report back...

Re: Reworked default websites

Posted: Sun 10 Nov 2024 10:18 am
by NeilThomas
wurzelmac wrote: Sun 10 Nov 2024 10:09 am Neil, I am running both the test and the live install on a Mac mini - both dashboards are showing the charts correct. The problem is the web. On my live default website (running the old piblic website https://cumuluswetter.unterwurzacher.at/ ) I can see the charts, on my test default website (running the AI2 website https://wetter.unterwurzacher.at/CumulusBeta/ ) I cannot see the charts. Both websites are driven by CMX V430B4049. :roll:
Oops, sorry I didn't re-read your earlier posts. :bash:

The only thing I can think of is paths to the data. I run both the default website and alternative website on ai2weather.uk and ai2weather.uk/default/ (not as a subdomain). I upload the data once to the ai2weather/default/ folder and then point my alternative site data to the default folder. Does this help?

Neil.

Re: Reworked default websites

Posted: Sun 10 Nov 2024 11:32 am
by wurzelmac
Nope, sorry...

What I really do not understand is that all other values in Dashboard, Today, Yest, TvsY, Gauges, Records are correct read and displayed on the website but only Charts are not working because of "Uncaught TypeError: Cannot read properties...".

Thanks for all your efforts, Neil - but for that it is only a test website there is no need for further investigation. Maybe one day I'll see what I'm doing wrong... :)

Re: Reworked default websites

Posted: Sun 10 Nov 2024 12:09 pm
by mcrossley
The old site loads the graphconfig like this:

Code: Select all

    $.ajax({
        url: "graphconfig.json",
        dataType: "json",
        success: function (result) {
            config = result;
            var value = parent.location.hash.replace('#', '');
            if (value == '')
                value = 'temp';

            changeGraph(value);
            // set the correct option
            $('#mySelect option[value="' + value + '"]').attr('selected', true);
        }
    });
Whereas the new site loads it like this:

Code: Select all

	$.ajax({url: dataPath + "graphconfig.json", success: function (result) {
		config = result;

		switch(config.wind.units){
			case 'mph':   beaufortScale = [ 1, 3, 7,12,18,24,31,38,46,54, 63, 72]; break;
			case 'km/h':  beaufortScale = [ 2, 5,11,19,29,39,50,61,74,87,101,116]; break;
			case 'm/s':   beaufortScale = [ 0, 0, 1, 1, 2, 3, 4, 5, 7,10, 12, 16]; break;
			case 'knots': beaufortScale = [ 3, 6,10,16,21,27,33,40,47,55, 63, 65]; break;
			default: 	  beaufortScale = [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1, -1];
			// NOTE: Using -1 means the line will never be seen.  No line is drawn for Hurricane.
		}	
		
		chillZone = config.temp.units === 'C' ? 4 : parseInt(4 * 9 / 5 + 32) ;
		
		var chart = sessionStorage.getItem('CMXTrends');
		if( chart === null ) {
			chart = 'temp';
		}

		doSelect( chart );
	}});
The new version does not convert the graphconfig from a string to JSON - it's missing the bit: datatype: "json",

Re: Reworked default websites

Posted: Sun 10 Nov 2024 12:28 pm
by NeilThomas
mcrossley wrote: Sun 10 Nov 2024 12:09 pm The old site loads the graphconfig like this:

Code: Select all

    $.ajax({
        url: "graphconfig.json",
        dataType: "json",
        success: function (result) {
            config = result;
            var value = parent.location.hash.replace('#', '');
            if (value == '')
                value = 'temp';

            changeGraph(value);
            // set the correct option
            $('#mySelect option[value="' + value + '"]').attr('selected', true);
        }
    });
Whereas the new site loads it like this:

Code: Select all

	$.ajax({url: dataPath + "graphconfig.json", success: function (result) {
		config = result;

		switch(config.wind.units){
			case 'mph':   beaufortScale = [ 1, 3, 7,12,18,24,31,38,46,54, 63, 72]; break;
			case 'km/h':  beaufortScale = [ 2, 5,11,19,29,39,50,61,74,87,101,116]; break;
			case 'm/s':   beaufortScale = [ 0, 0, 1, 1, 2, 3, 4, 5, 7,10, 12, 16]; break;
			case 'knots': beaufortScale = [ 3, 6,10,16,21,27,33,40,47,55, 63, 65]; break;
			default: 	  beaufortScale = [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1, -1];
			// NOTE: Using -1 means the line will never be seen.  No line is drawn for Hurricane.
		}	
		
		chillZone = config.temp.units === 'C' ? 4 : parseInt(4 * 9 / 5 + 32) ;
		
		var chart = sessionStorage.getItem('CMXTrends');
		if( chart === null ) {
			chart = 'temp';
		}

		doSelect( chart );
	}});
The new version does not convert the graphconfig from a string to JSON - it's missing the bit: datatype: "json",
Mark.

It still works though on th latest version I have uploaded. I will add the dataType to the next release.

Neil.

Re: Reworked default websites

Posted: Sun 10 Nov 2024 12:53 pm
by wurzelmac
Wow :o

I looked at the lines Mark spotted and added "dataType..." and here we are!!! Thanks alot to Mark and Neil for their patience and help :!: :!: :!:

Re: Reworked default websites

Posted: Sun 10 Nov 2024 10:04 pm
by ConligWX
Thanks for the new file Neil. Much appreciated. I'll start updating my site start of this week.

Re: Reworked default websites

Posted: Mon 11 Nov 2024 10:57 am
by NeilThomas
Hi all

Corrected the issues with the charts and uploaded a new package to the wiki. Apologies to all for the mistake.

Neil