Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Error in testtags.php

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Error in testtags.php

Post by nitrx »

WX_Frank wrote:Just found this site who got similar errors like mine, but with correct date & year :roll:
http://www.tiempoensevilla.es/index.php?sce=view

I will study some more, but really hope anyone got some new ideas?
The date format used on the computer and cumulus differs from yours so it's all about dd.mm.yyyy I think http://www.tiempoensevilla.es/CUtags.php?sce=dump
WX_Frank
Posts: 82
Joined: Sun 24 Jul 2011 9:12 am
Weather Station: Davis Vantage Vue
Operating System: Win7
Location: Torrevieja/Spain
Contact:

Re: Error in testtags.php

Post by WX_Frank »

nitrx wrote:
WX_Frank wrote:Just found this site who got similar errors like mine, but with correct date & year :roll:
http://www.tiempoensevilla.es/index.php?sce=view

I will study some more, but really hope anyone got some new ideas?
The date format used on the computer and cumulus differs from yours so it's all about dd.mm.yyyy I think http://www.tiempoensevilla.es/CUtags.php?sce=dump
I see, but don't know where to do the right necessary changes? :(
Is there different 'tags' to try out?
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Error in testtags.php

Post by nitrx »

WX_Frank wrote:
nitrx wrote:
WX_Frank wrote:Just found this site who got similar errors like mine, but with correct date & year :roll:
http://www.tiempoensevilla.es/index.php?sce=view

I will study some more, but really hope anyone got some new ideas?
The date format used on the computer and cumulus differs from yours so it's all about dd.mm.yyyy I think http://www.tiempoensevilla.es/CUtags.php?sce=dump
I see, but don't know where to do the right necessary changes? :(
Is there different 'tags' to try out?
Look at this thread thread there was a problem with the same date issueas you have I was just reading .. https://cumulus.hosiene.co.uk/viewtopic.p ... &start=400
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Error in testtags.php

Post by nitrx »

You have to change the CU-defs.php


So the issue is the date format in $WX['date'] = '6.9.2011';
is the underlying cause. So... change your CU-defs.php from
Code:

Code: Select all

 $d = explode('/',$indate);
  if(!isset($d[2])) {$d = explode("-",$indate);}
to
Code:

Code: Select all

 $d = explode('/',$indate);
  if(!isset($d[2])) {$d = explode("-",$indate);}
  if(!isset($d[2])) {$d = explode(".",$indate);}
and that should fix the date issue. But Ken wrote he should it fix in the next update , I'm note sure if he did it...
WX_Frank
Posts: 82
Joined: Sun 24 Jul 2011 9:12 am
Weather Station: Davis Vantage Vue
Operating System: Win7
Location: Torrevieja/Spain
Contact:

Re: Error in testtags.php

Post by WX_Frank »

nitrx wrote:You have to change the CU-defs.php


So the issue is the date format in $WX['date'] = '6.9.2011';
is the underlying cause. So... change your CU-defs.php from
Code:

Code: Select all

 $d = explode('/',$indate);
  if(!isset($d[2])) {$d = explode("-",$indate);}
to
Code:

Code: Select all

 $d = explode('/',$indate);
  if(!isset($d[2])) {$d = explode("-",$indate);}
  if(!isset($d[2])) {$d = explode(".",$indate);}
and that should fix the date issue. But Ken wrote he should it fix in the next update , I'm note sure if he did it...
,,for a minute I tough - finally!!, but I already got this update, Ron.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Error in testtags.php

Post by nitrx »

yep i thought so, but you should ask questions about the php-templates in https://cumulus.hosiene.co.uk/viewtopic.php?f=18&t=4561 this thread i'm sure Ken get's mail when there is a posting over there.
WX_Frank
Posts: 82
Joined: Sun 24 Jul 2011 9:12 am
Weather Station: Davis Vantage Vue
Operating System: Win7
Location: Torrevieja/Spain
Contact:

Re: Error in testtags.php

Post by WX_Frank »

nitrx wrote:yep i thought so, but you should ask questions about the php-templates in https://cumulus.hosiene.co.uk/viewtopic.php?f=18&t=4561 this thread i'm sure Ken get's mail when there is a posting over there.
I will do that Ron, thanks...this drives me nuts...ha ha
heres another setting
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Error in testtags.php

Post by saratogaWX »

Wow! :o :shock: This has been quite a thread so far. Sorry for not joining in the discussion sooner.

Let me see if I can help about the dates issue.

Looking at http://www.torrevieja-weather.net/CUtags.php?sce=dump

shows
$WX['tempunit'] = '°C';
$WX['pressunit'] = 'mb';
$WX['rainunit'] = 'mm';
$WX['windunit'] = 'km/h';
$WX['windrununit'] = 'km';
$WX['date'] = '08.10.2011';
$WX['time'] = '21:55 on 08 oktober 2011';
$WX['timehhmmss'] = '21:55:01';
$WX['day'] = '08';
$WX['dayname'] = 'lørdag';
...
$WX['OsLanguage'] = 'Spanish';
The highlighted values are quite interesting. The Date is in dot-format (which is supported by both the current CU-defs.php and ajaxCUwx.js) without mods.

Looking further at http://www.torrevieja-weather.net/wxind ... w=settings

and a view-source shows
[monthNames] => Array
(
[0] => January
[1] => February
[2] => March
[3] => April
[4] => May
[5] => June
[6] => July
[7] => August
[8] => September
[9] => October
[10] => November
[11] => December
)
which means the dates used by Cumulus are expected to be in English, yet despite your OS setting of 'Spanish'
your dates are in Norwegian (month='oktober', dayname='lørdag').

Do you have Cumulus set to use Norwegian?

If so, then changing your Settings.php

Code: Select all

$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language 
'January','February','March','April','May','June',
'July','August','September','October','November','December'
);
to the Norwegian (for your current setup)

Code: Select all

$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language 
"Januar","Februar","Mars","April","Mai","Juni",
"Juli","August","September","Oktober","November","Desember"
);
will fix the current dates issue.

Or if you change Cumulus to use Spanish then use

Code: Select all

$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language 
"Enero","Febrero","Marzo","Abril","Mayo","Junio",
"Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"
);
The 'dot-format' date is handled correctly by the template set IF the native language of the CUtags.php dates
is set with the correct $SITE['monthNames'] array -- otherwise PHP can not interpret the month names correctly
and you end up with bad dates showing everywhere. I would recommend you change Cumulus to use Spanish and then use the Spanish version for your Settings.php $SITE['monthNames'] entry.

You also should change in Settings.php

Code: Select all

$SITE['lang'] = 'en';                // default language for website to use
to

Code: Select all

$SITE['lang'] = 'es';                // default language for website to use
so the default language to use is Spanish.

Hope this helps...
Best regards,
Ken
WX_Frank
Posts: 82
Joined: Sun 24 Jul 2011 9:12 am
Weather Station: Davis Vantage Vue
Operating System: Win7
Location: Torrevieja/Spain
Contact:

Re: Error in testtags.php

Post by WX_Frank »

saratogaWX wrote:Wow! :o :shock: This has been quite a thread so far. Sorry for not joining in the discussion sooner.

Let me see if I can help about the dates issue.

Looking at http://www.torrevieja-weather.net/CUtags.php?sce=dump

shows
$WX['tempunit'] = '°C';
$WX['pressunit'] = 'mb';
$WX['rainunit'] = 'mm';
$WX['windunit'] = 'km/h';
$WX['windrununit'] = 'km';
$WX['date'] = '08.10.2011';
$WX['time'] = '21:55 on 08 oktober 2011';
$WX['timehhmmss'] = '21:55:01';
$WX['day'] = '08';
$WX['dayname'] = 'lørdag';
...
$WX['OsLanguage'] = 'Spanish';
The highlighted values are quite interesting. The Date is in dot-format (which is supported by both the current CU-defs.php and ajaxCUwx.js) without mods.

Looking further at http://www.torrevieja-weather.net/wxind ... w=settings

and a view-source shows
[monthNames] => Array
(
[0] => January
[1] => February
[2] => March
[3] => April
[4] => May
[5] => June
[6] => July
[7] => August
[8] => September
[9] => October
[10] => November
[11] => December
)
which means the dates used by Cumulus are expected to be in English, yet despite your OS setting of 'Spanish'
your dates are in Norwegian (month='oktober', dayname='lørdag').

Do you have Cumulus set to use Norwegian?

If so, then changing your Settings.php

Code: Select all

$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language 
'January','February','March','April','May','June',
'July','August','September','October','November','December'
);
to the Norwegian (for your current setup)

Code: Select all

$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language 
"Januar","Februar","Mars","April","Mai","Juni",
"Juli","August","September","Oktober","November","Desember"
);
will fix the current dates issue.

Or if you change Cumulus to use Spanish then use

Code: Select all

$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language 
"Enero","Febrero","Marzo","Abril","Mayo","Junio",
"Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"
);
The 'dot-format' date is handled correctly by the template set IF the native language of the CUtags.php dates
is set with the correct $SITE['monthNames'] array -- otherwise PHP can not interpret the month names correctly
and you end up with bad dates showing everywhere. I would recommend you change Cumulus to use Spanish and then use the Spanish version for your Settings.php $SITE['monthNames'] entry.

You also should change in Settings.php

Code: Select all

$SITE['lang'] = 'en';                // default language for website to use
to

Code: Select all

$SITE['lang'] = 'es';                // default language for website to use
so the default language to use is Spanish.

Hope this helps...
Best regards,
Ken
Hi Ken...and really glad you're here :)

I'm so sorry I didn't mentioned earlier that I'm a Norwegian living in Spain, and therefore my Cumulus settings (of course) are in Norwegian :oops:
If I change my computer time setting from Norwegian to English....will this maybe solve the problem without damage my weather data??

I did both changes you told me (site language to 'no'), but still can't get it right!!

Thanks for helping, Ken :)
WX_Frank
Posts: 82
Joined: Sun 24 Jul 2011 9:12 am
Weather Station: Davis Vantage Vue
Operating System: Win7
Location: Torrevieja/Spain
Contact:

Re: Error in testtags.php

Post by WX_Frank »

Than pc time setting did the job, but is there a way I can keep it in Norwegian?
...and why don't the 'Updates paused - reload page to start @...' do the auto update?

I'm finally feeling we getting there :clap:
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Error in testtags.php

Post by saratogaWX »

Well, running Cumulus in Norwegian is now very understandable :)

Looks like doing the $SITE['monthNames'] setting with Norwegian in it is working as the dates internally seem to be processed correctly
<!-- CU_getRecordDate input tstr='07 oktober 2011' -->

<!-- CU_getRecordDate after tstr='07 October 2011' -->
<!-- CU_getRecordDate result ltime='7 10 2011' -->
<!-- CU_getRecordDate input tstr='31 august 2011' -->
<!-- CU_getRecordDate after tstr='31 August 2011' -->
<!-- CU_getRecordDate result ltime='31 8 2011' -->
<!-- CU_getAlltimeDate input inDate='at 10:57 on 30 august 2011' -->
<!-- CU_getAlltimeDate after tstr='30 August 2011 10:57' -->
<!-- CU_getAlltimeDate result ltime='30 8 2011 10:57' -->
<!-- CU_getAlltimeDate input inDate='at 07:28 on 08 oktober 2011' -->
<!-- CU_getAlltimeDate after tstr='08 October 2011 07:28' -->
<!-- CU_getAlltimeDate result ltime='8 10 2011 07:28' -->
Now it appears you are missing a key thing in Settings-weather.php

Code: Select all

$SITE['WXsoftware']     = 'CU';
I would extract another copy of Settings-weather.php from the CU-plugin.zip, customize only the areas indicated in the docs, and upload it to your site to ensure all the proper stuff is in there. Missing that one $SITE entry will cause the template set to think you haven't installed a plugin yet, so suppress all the station-specific displays.

Best regards,
Ken
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Error in testtags.php

Post by nitrx »

BTW your data are not consequent by changing the comma in a point you lose your old data ....
WX_Frank
Posts: 82
Joined: Sun 24 Jul 2011 9:12 am
Weather Station: Davis Vantage Vue
Operating System: Win7
Location: Torrevieja/Spain
Contact:

Re: Error in testtags.php

Post by WX_Frank »

saratogaWX wrote:Well, running Cumulus in Norwegian is now very understandable :)

Looks like doing the $SITE['monthNames'] setting with Norwegian in it is working as the dates internally seem to be processed correctly
<!-- CU_getRecordDate input tstr='07 oktober 2011' -->

<!-- CU_getRecordDate after tstr='07 October 2011' -->
<!-- CU_getRecordDate result ltime='7 10 2011' -->
<!-- CU_getRecordDate input tstr='31 august 2011' -->
<!-- CU_getRecordDate after tstr='31 August 2011' -->
<!-- CU_getRecordDate result ltime='31 8 2011' -->
<!-- CU_getAlltimeDate input inDate='at 10:57 on 30 august 2011' -->
<!-- CU_getAlltimeDate after tstr='30 August 2011 10:57' -->
<!-- CU_getAlltimeDate result ltime='30 8 2011 10:57' -->
<!-- CU_getAlltimeDate input inDate='at 07:28 on 08 oktober 2011' -->
<!-- CU_getAlltimeDate after tstr='08 October 2011 07:28' -->
<!-- CU_getAlltimeDate result ltime='8 10 2011 07:28' -->
Now it appears you are missing a key thing in Settings-weather.php

Code: Select all

$SITE['WXsoftware']     = 'CU';
I would extract another copy of Settings-weather.php from the CU-plugin.zip, customize only the areas indicated in the docs, and upload it to your site to ensure all the proper stuff is in there. Missing that one $SITE entry will cause the template set to think you haven't installed a plugin yet, so suppress all the station-specific displays.

Best regards,
Ken
Hmm...strange, but I will do as you say Ken by extract and edit a new one...and this will fix the auto reload as well?
But I will loose my old data with this new (English) time setting?
Not really a big deal since I started this station 2month back!

Best regards, and big thanks to everyone involved helping :clap:
Frank.

EDIT: What happend?? ...just did a refrersh on my site, and now it's reloading!!! :shock:
Last edited by WX_Frank on Sat 08 Oct 2011 9:52 pm, edited 1 time in total.
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Error in testtags.php

Post by saratogaWX »

Also, it looks like your CUtags.php is not being uploaded fully

http://www.torrevieja-weather.net/CUtags.php?sce=dump

shows nothing, so your site will show no current weather data.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Error in testtags.php

Post by nitrx »

Well your solar data are definitely wrong http://www.torrevieja-weather.net/wxastronomy.php sunset same time as sunrise and http://www.torrevieja-weather.net/wxindex.php?sce=view gives a great mess :o
Post Reply