Author Topic: Updates  (Read 1442 times)

0 Members and 1 Guest are viewing this topic.

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Updates
« on: February 09, 2023, 01:24:17 PM »
So I just did the recomended updates -- and now part of my home page is elongated
pennlake.us

I would suspect the  ajax-dashboard.php or it could be wxforecast.php??? The updates were:


check-fetch-times.php
   Updated: 2023-02-07 10:11
   Version 'check-fetch-times.php Version 1.49 - 07-Feb-2023'
   Size: 72054 bytes
   Recommend: Replace current copy with updated copy.


ajax-dashboard.php
   Updated: 2023-02-07 08:13
   Version 'ajax-dashboard.php - Version 1.33 - 07-Feb-2023 - Multilingual'
   Size: 62091 bytes
   Recommend: Replace current copy with updated copy.


wxforecast.php
   Updated: 2023-02-07 08:01
   Version '1.06 - 07-Feb-2023 - added support for OpenWeatherMap and VirtualCrossing forecasts'
   Size: 8264 bytes
   Recommend: Replace current copy with updated copy.

--- 3 updates to Base-USA since 2023-02-07
-----------------------------------------




Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #1 on: February 09, 2023, 01:44:33 PM »
I just noticed this:

Warning: Undefined array key 1 in /home/hogan2/pennlake.us/ajax-dashboard6.php on line 2904

Warning: Undefined array key 2 in /home/hogan2/pennlake.us/ajax-dashboard6.php on line 2907

Offline Vasco

  • Senior Contributor
  • ****
  • Posts: 186
    • PWS
Re: Updates
« Reply #2 on: February 09, 2023, 02:56:46 PM »
Are you confusing ajax-dashboard.php with ajax-dashboard6.php?
Oregon Scientific WMR200 + Weather Display in Windows 10

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #3 on: February 09, 2023, 03:27:35 PM »
I don't thnk so?
I updated the ajax-dashboard.php as directed along with the wxforecast.php and check-fetch-times.php.
After updating, my home page - and only the home page in the middle section is elongated.
I didn't notice the:
Warning: Undefined array key 1 in /home/hogan2/pennlake.us/ajax-dashboard6.php on line 2904

Warning: Undefined array key 2 in /home/hogan2/pennlake.us/ajax-dashboard6.php on line 2907

Until I went back and saw those on my home page, so I went back and posted what else I found.

Am I confusing the 2, I don't know, all I can tell you is that I'm confused and hence the post. I don't know why an update to the ajax-dashboard.php, creates the home page error and also throws the warnings out.

Offline Vasco

  • Senior Contributor
  • ****
  • Posts: 186
    • PWS
Re: Updates
« Reply #4 on: February 10, 2023, 12:52:55 PM »
After updating, my home page - and only the home page in the middle section is elongated.

Yeah, one is in widescreen and the other is not.

Quote
Am I confusing the 2, I don't know, all I can tell you is that I'm confused and hence the post. I don't know why an update to the ajax-dashboard.php, creates the home page error and also throws the warnings out.

I don't know either, maybe post under Weather Website PHP/AJAX scripting?
Oregon Scientific WMR200 + Weather Display in Windows 10

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #5 on: February 10, 2023, 01:25:32 PM »
Thanks for the reply Vasco and advice! I was going to post there this morning, but realized that I would be away for the weekend, and if someone had an answer or suggestion, I wouldn't be around to try it out, So, perhaps Sunday - oh but the Superbowl will be on, lol.

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #6 on: February 10, 2023, 01:28:55 PM »
I had this issue years ago but not with that warning, it was something else and someone had a quick response for a fix. but I went through my post and couldn't find it. But again I think it's something else.

Again thanks for your help.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9015
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Updates
« Reply #7 on: February 10, 2023, 02:32:41 PM »
You're using the alt-ajax-dashboard.php (ajax-dashboard6.php) Version 6.95e - 01-Feb-2022 .. there's a 6.95f version which handles PHP 8.1.

The two errata are coming from the split_hash_date() function, and there are two instances of that:

   Line 1165:                         <?php $_array = split_hash_date($dateoflastrainalways) ?>
   Line 1734:                         <?php $_array = split_hash_date($firstsnowseason) ?>

Looking at testtags.php shows:

$dateoflastrainalways = '---';

and $firstsnowseason is not in testtags.php

The rain info is likely the cause of the issue since no rain has been recorded, so the last rain date is 'null'.

Change
Code: [Select]
                        <?php $_array split_hash_date($dateoflastrainalways?>
                        <?php echo rdate($RecDateF$_array[1], $_array[0], $_array[2]); ?> <br/>
                        <?php echo "at " $timeoflastrainalways?>
to
Code: [Select]
                        <?php if($dateoflastrainalways !=="---") {$_array split_hash_date($dateoflastrainalways?>
                        <?php echo rdate($RecDateF$_array[1], $_array[0], $_array[2]); ?> <br/>
                        <?php echo "at " $timeoflastrainalways
                        } else { print 
"N/A"; } ?>

« Last Edit: February 10, 2023, 02:37:51 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #8 on: February 10, 2023, 03:30:54 PM »
Thanks for the reply Ken.

I Thought I did all that because I upgraded to PHP 8.1 a while ago, at least I thought I did and everything seemed to work -- In the past 2 weeks my hosting service ungraded the Linux to Enterprise 8 from 6, and lst week I finally caved in with windows forcing me to go to Win 11.

So with that being said I downloaded the zip file AltAjaxDashboard695f  extracting the zip there are are bunch of other folders and files some of which seem to be the same as what I have -- so should I update all?

Thanks.
 

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #9 on: February 10, 2023, 04:04:41 PM »
Hi Ken, I won't be able to work on this until Sunday - but - this happened after I checked my staus page and it said I needed to update some of my files -- Any way I think what happened is that I went from the 695f back to the 695e - cause I just check the downloaded file it gave me to update yesterday and that's what it was 695e.

Ok thanks later.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9015
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Updates
« Reply #10 on: February 10, 2023, 06:24:30 PM »
The alt-ajax-dashboard script set is not monitored by check-fetch-times.php since it's in the 'legacy-scripts' area.  You just need to use that page to monitor versions.
The 'stock' ajax-dashboard.php is included in the templates and checker (and will be downloaded via the update tool).  6.95f is the current version of the alt-ajax-dashboard script set (and associated scripts which should be replaced from that .zip except for the AltAjaxDashboardConfig6.php file)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #11 on: February 11, 2023, 09:53:31 PM »
Well I had the chance to change that code and it looks like the same message. I did not see the 2 testtags in the folder, do I need to add them?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9015
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Updates
« Reply #12 on: February 13, 2023, 01:40:02 PM »
You don't need to add testtags.php .. it should be created by WD processing a testtags.txt file and substituting for weather variables.

Check your WD setup (see https://saratoga-weather.org/wxtemplates/setup-WD.php) for where to put a fresh copy of testtags.txt from the WD-plugin.zip and to process and FTP the resulting testtags.php file to your website.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #13 on: February 13, 2023, 03:46:23 PM »
So --- I downloaded the AltAjaxDashboard695f hopefully that is the right file
I extracted it and have updated my website with those files.

One thing I did notice - in the WD-testtags folder the folder contanins testags
// Version 1.07 - 23-Jul-2011 -- added support for multiple plugin scripts for WD - see comments for supported scripts

But on my desk top I found a testags file listed - // Version 1.08 - 04-Aug-2012 -- added support for monthly average tags   I updated to that and I now get different error.

Is there still another new testtag update out there somewhere?


Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #14 on: February 13, 2023, 03:47:44 PM »
Oh in my WD files the // Version 1.07 - 23-Jul-2011 was already there.

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #15 on: February 13, 2023, 04:39:44 PM »
and the testtagphp is version 1.08 in my WD webfiles  -- also I put the 1.07 testtags back, less errors showing up.

Offline Vasco

  • Senior Contributor
  • ****
  • Posts: 186
    • PWS
Re: Updates
« Reply #16 on: February 13, 2023, 05:43:05 PM »
Is there still another new testtag update out there somewhere?

As Ken says, you can find it in the WD-plugin.zip - or maybe this download is easier.
Oregon Scientific WMR200 + Weather Display in Windows 10

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9015
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Updates
« Reply #17 on: February 13, 2023, 06:04:18 PM »
The version in the WD-plugin.zip is marked V1.07 -23-Jul-2011, but further down, it was updated 09-Nov-2018 with PurpleAir tags.  That's the one to use.
I don't know about a V1.08 as I'd not released one with that version.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Vasco

  • Senior Contributor
  • ****
  • Posts: 186
    • PWS
Re: Updates
« Reply #18 on: February 13, 2023, 06:16:18 PM »
I don't know about a V1.08 as I'd not released one with that version.

Sorry, Ken, my WD 10.37S145 includes "Version 1.08 - 04-Aug-2012 -- added support for monthly average tags" - but not the PurpleAir mod you mention.

P.S. That's not the version I use for the template!

MUCH LATER EDIT: Actually I have no idea where I got 1.08. . . But I did find this  :???:
« Last Edit: July 02, 2023, 12:21:38 PM by Vasco »
Oregon Scientific WMR200 + Weather Display in Windows 10

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #19 on: February 13, 2023, 07:30:25 PM »
Ok I got the purple air testtag file and put it in the WD wbfile, but still the same issue.

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #20 on: February 13, 2023, 07:32:50 PM »
so how about the AltAjaxDashboardConfig6.php file, where can I get the right version of that script?

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #21 on: February 14, 2023, 10:40:38 AM »
So using versions:  ajax-dashboard.php - Version 1.33 - 07-Feb-2023
                             ajax-dashboard6.php - Version 6.95f - 31-Dec-2022'
                              AltAjaxDashboardConfig - Version 6.92d 14-May-2021

I get theses errors  Warning: Undefined array key 1 in /home/hogan2/pennlake.us/ajax-dashboard6.php on line 2907
                             Warning: Undefined array key 2 in /home/hogan2/pennlake.us/ajax-dashboard6.php on line 2910


If I change the ajx-dashboard6.php back to Version 6.95e - 01-Feb-2022';
I get these warnings:
                             Warning: Undefined array key 1 in /home/hogan2/pennlake.us/ajax-dashboard6.php on line 2904
                             Warning: Undefined array key 2 in /home/hogan2/pennlake.us/ajax-dashboard6.php on line 2907

I did not look at the difference in the code 2907 is common in both


Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #22 on: February 14, 2023, 04:05:25 PM »
And the WD testtags are the purple air.

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 412
    • Penn Lake Weather
Re: Updates
« Reply #23 on: February 15, 2023, 06:32:37 AM »
Ok, got it -- after changing just about everything -I did change the ajax dashboard script per your instruction, but with all the changes I made I guess I substituted a clean sript back into the equation. I went through everything again last night and Wahoo!!!

Thanks Ken and Vasco!!!!!!!

 

anything