Author Topic: wxforecast.php advisory display error  (Read 335 times)

0 Members and 1 Guest are viewing this topic.

Offline tshattuck

  • Forecaster
  • *****
  • Posts: 337
    • Your Local Weather - Clay, NY
wxforecast.php advisory display error
« on: May 10, 2020, 07:52:38 PM »
Ken:
I just noticed on my NWS Forecast Page http://yourlocalweather-clay-ny.com/wxforecast.php
when I click on the NWS Warning I get the following error: Cannot GET /products/NWS-IDP-PROD-4204196-3553335

I am not sure what is going on. I seem to have all the required updates except for those you posted in the last two weeks. I installed them and received many messages on wxstatus.php. Some files in your template set are not used on my website so I reverted back the previous versions of those files now wxstatus is working correctly. I still have the problem with the wxforecast.php page.

Hope you can help.

Regards

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 949
    • LexMAWeather
Re: wxforecast.php advisory display error
« Reply #1 on: May 10, 2020, 09:54:44 PM »
It looks like NWS has changed the URL format to get to the text alerts on alerts-v2.weather.gov

It now needs to be of the form:

  https://alerts-v2.weather.gov/#/?id=NWS-IDP-PROD-4204245-3553356

You can try out a possible fix by going into advforecast2.php, finding this line:

Code: [Select]
  define('ALERTURL', 'https://alerts-v2.weather.gov/products/');
and changing it to:

Code: [Select]
  define('ALERTURL', 'https://alerts-v2.weather.gov/#/?id=');
Worked for me.

Final fix will come from Ken, of course!
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline tshattuck

  • Forecaster
  • *****
  • Posts: 337
    • Your Local Weather - Clay, NY
Re: wxforecast.php advisory display error
« Reply #2 on: May 10, 2020, 11:15:05 PM »
Jasiu:

Thanks for the feedback, your suggestion worked.  :grin:

The attached file is what now displays when I click on the link in wxforecast.php. I noticed the code appeared twice in the script so I changed in both locations.

I noticed in Auburn, NY the Freeze Watch shows up twice, I assume that is something the NWS is doing. Sometimes I have to refresh the webpage to get the Warning to display. The Forecast Pages load rather slowly I am not sure if this is a script problem or the Internet (ISP). Maybe some other changes are needed in the script.

Hopefully Ken can review.

Thanks again for your assistance.

« Last Edit: May 10, 2020, 11:28:07 PM by tshattuck »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxforecast.php advisory display error
« Reply #3 on: May 11, 2020, 12:25:57 AM »
I like it.  THANKS Jasiu!!  8-)  =D>  =D>  \:D/

I've updated the Base-USA distribution and the standalone page with advforecast2.php V5.14 (JSON) incorporating your fix (with credit  [tup] )

Best regards,
Ken
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 tshattuck

  • Forecaster
  • *****
  • Posts: 337
    • Your Local Weather - Clay, NY
Re: wxforecast.php advisory display error
« Reply #4 on: May 11, 2020, 10:53:09 AM »
Ken:
Thanks for your assistance.