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
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
wxcurecords.php
Moderator: daj
-
n9mfk
- Posts: 845
- Joined: Sun 10 May 2009 8:52 pm
- Weather Station: davis vp2 Serial datalogger
- Operating System: Windows 7 64-bit
- Location: Springfield, IL
wxcurecords.php
hi All,
i get this error were a month should be
Notice: Undefined index: langMonths in C:\c_n9mfk\www\wxcurecords.php on line 217
I have not made any changes to wxcurecords.php
how can i fix this
thanks beau
http://99.148.159.206/wxcurecords.php
i get this error were a month should be
Notice: Undefined index: langMonths in C:\c_n9mfk\www\wxcurecords.php on line 217
I have not made any changes to wxcurecords.php
how can i fix this
thanks beau
http://99.148.159.206/wxcurecords.php
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: wxcurecords.php
Looks OK from here ?
......................Imagine, what you will KNOW tomorrow !
-
n9mfk
- Posts: 845
- Joined: Sun 10 May 2009 8:52 pm
- Weather Station: davis vp2 Serial datalogger
- Operating System: Windows 7 64-bit
- Location: Springfield, IL
Re: wxcurecords.php
Hi beteljuice,
if you load the page then click reload it will brake
Beau
if you load the page then click reload it will brake
Beau
- 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: wxcurecords.php
It appears that one of the functions is having a problem with your date/time format for all-time records:
The extra PM or AM was unanticipated.. I'll need to change the CU_getAlltimeDate function to fix that.<!-- CU_getAlltimeDate input inDate='at 3:37 PM on 21 July 2011' -->
<!-- CU_getAlltimeDate after tstr='$2 $1' -->
<!-- CU_getAlltimeDate result ltime='31 12 1969 18:00' -->
<!-- CU_getAlltimeDate input inDate='at 7:33 AM on 10 January 2010' -->
<!-- CU_getAlltimeDate after tstr='$2 $1' -->
<!-- CU_getAlltimeDate result ltime='31 12 1969 18:00' -->
- 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: wxcurecords.php
I think my prior post was somewhat in error .. the problem seems to be your PHP installation, Beau.
The code in CU_getAlltimeDate()
seems to fail in your PHP to set the temporary variables $1 and $2 with the results of the last preg_match (which works fine on my PHP).
You can change that code to which uses the $m variable to store the matches. I'll change the code in the next release of the CU-defs.php version, but go ahead and try it on your copy.
The code in CU_getAlltimeDate()
Code: Select all
if(preg_match('|^at (.*) on (.*)$|i',$inDate)) { // at 2:45 PM on 16 October 2009
$tstr = "$2 $1";
} elseif (preg_match('|^on (.*)$|i',$inDate)) { // on 16 October 2009
$tstr = "$1";
}
You can change that code to
Code: Select all
if(preg_match('|^at (.*) on (.*)$|i',$inDate,$m)) { // at 2:45 PM on 16 October 2009
$tstr = $m[2] . " " .$m[1];
} elseif (preg_match('|^on (.*)$|i',$inDate,$m)) { // on 16 October 2009
$tstr = $m[1];
}
-
n9mfk
- Posts: 845
- Joined: Sun 10 May 2009 8:52 pm
- Weather Station: davis vp2 Serial datalogger
- Operating System: Windows 7 64-bit
- Location: Springfield, IL
Re: wxcurecords.php
Hi Ken,
i put in the new code im still get the Notice: Undefined index: langMonths in C:\c_n9mfk\www\wxcurecords.php on line 217 2009
Beau
i put in the new code im still get the Notice: Undefined index: langMonths in C:\c_n9mfk\www\wxcurecords.php on line 217 2009
Beau
- 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: wxcurecords.php
With the modified code, the CU_getAlltimeDate() routine is correctly parsing it with your PHP
However, there's a problem in
Your site seems to be missing the language-en.js file .. install that, and you should be rid of the Notice error.
Code: Select all
<!-- CU_getAlltimeDate input inDate='at 3:37 PM on 21 July 2011' -->
<!-- CU_getAlltimeDate after tstr='21 July 2011 3:37 PM' -->
<!-- CU_getAlltimeDate result ltime='21 7 2011 15:37' -->
<!-- CU_getAlltimeDate input inDate='at 7:33 AM on 10 January 2010' -->
<!-- CU_getAlltimeDate after tstr='10 January 2010 7:33 AM' -->
<!-- CU_getAlltimeDate result ltime='10 1 2010 07:33' -->
The fix_CU_record_date() function is showing<tr class="column-dark">
<td><?php langtrans('Highest'); ?> <?php langtrans('Monthly Rainfall'); ?></td>
<td><?php print $WX['rfallmH']; ?> <?php print $SITE['uomRain']; ?></td>
<td><?php print fix_CU_record_date($WX['TrfallmH']); ?></td>
</tr>
so the month/year are processed correctly.<tr class="column-dark">
<td>Highest Monthly Rainfall</td>
<td>8.78 in</td>
<td><!-- inDate='October 2009' month='October' year='2009' -->
Notice: Undefined index: langMonths in C:\c_n9mfk\www\wxcurecords.php on line 217
<!-- outTime=' 2009' -->
2009</td>
</tr>
Your site seems to be missing the language-en.js file .. install that, and you should be rid of the Notice error.
You do not have the required permissions to view the files attached to this post.
-
n9mfk
- Posts: 845
- Joined: Sun 10 May 2009 8:52 pm
- Weather Station: davis vp2 Serial datalogger
- Operating System: Windows 7 64-bit
- Location: Springfield, IL
Re: wxcurecords.php
Hi Ken,
I added the file what else did need to change im still get the error?
Beau
I added the file what else did need to change im still get the error?
Beau
Re: wxcurecords.php
I got the same problem as beau.
<tr class="column-dark">
<td>Highest Monthly Rainfall</td>
<td>7.35 in</td>
<td><!-- inDate='May 2011' month='May' year='2011' -->
<!-- outTime=' 2011' -->
2011</td>
<tr class="column-dark">
<td>Highest Monthly Rainfall</td>
<td>7.35 in</td>
<td><!-- inDate='May 2011' month='May' year='2011' -->
<!-- outTime=' 2011' -->
2011</td>
- 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: wxcurecords.php
Beau, you added the file as language-en.js.txt, it needs to be language-en.jsn9mfk wrote:Hi Ken,
I added the file what else did need to change im still get the error?
Beau
That's why I'd put the comment with the download to "Save file as language-en.js".
What's the URL for your website, Mike?mike wrote:I got the same problem as beau.
<tr class="column-dark">
<td>Highest Monthly Rainfall</td>
<td>7.35 in</td>
<td><!-- inDate='May 2011' month='May' year='2011' -->
<!-- outTime=' 2011' -->
2011</td>
- 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: wxcurecords.php
Ahh... found the underlying issue.. I'd forgotten to put a copy of the language-en.js into the Base-USA distribution .zip (now corrected).
So those users of Base-USA with Cumulus-Plugin will need to manually add the language-en.js file to fix the Notice error and correctly display the month for Hightest Rain in wxcurecords.php
Sorry for the inconvenience.
Best regards,
Ken
So those users of Base-USA with Cumulus-Plugin will need to manually add the language-en.js file to fix the Notice error and correctly display the month for Hightest Rain in wxcurecords.php
Sorry for the inconvenience.
Best regards,
Ken
-
n9mfk
- Posts: 845
- Joined: Sun 10 May 2009 8:52 pm
- Weather Station: davis vp2 Serial datalogger
- Operating System: Windows 7 64-bit
- Location: Springfield, IL
Re: wxcurecords.php
Hi ken,
I Changed the name of the file
im still get Undefined index: langMonths in C:\c_n9mfk\www\wxcurecords.php on line 217 2009
Beau
I Changed the name of the file
im still get Undefined index: langMonths in C:\c_n9mfk\www\wxcurecords.php on line 217 2009
Beau
Last edited by n9mfk on Mon 29 Aug 2011 10:11 pm, edited 1 time in total.
Re: wxcurecords.php
Ahh... found the underlying issue.. I'd forgotten to put a copy of the language-en.js into the Base-USA distribution .zip (now corrected).
So those users of Base-USA with Cumulus-Plugin will need to manually add the language-en.js file to fix the Notice error and correctly display the month for Hightest Rain in wxcurecords.php
That fixed it for me.
Thanks
- 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: wxcurecords.php
Beau,
It looks like the language translation function is not engaging.
You seem to also be missing language-en.txt file.
Try installing that too (I've fixed that in the distribution).
It looks like the language translation function is not engaging.
You seem to also be missing language-en.txt file.
Try installing that too (I've fixed that in the distribution).
You do not have the required permissions to view the files attached to this post.
-
n9mfk
- Posts: 845
- Joined: Sun 10 May 2009 8:52 pm
- Weather Station: davis vp2 Serial datalogger
- Operating System: Windows 7 64-bit
- Location: Springfield, IL
Re: wxcurecords.php
Hi Ken,
that fixed it
are there any other file missing
what are thy used for ?
thanks
that fixed it
are there any other file missing
what are thy used for ?
thanks