Author Topic: Alerts not showing on website  (Read 447 times)

0 Members and 1 Guest are viewing this topic.

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2846
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
Alerts not showing on website
« on: April 25, 2019, 07:17:33 PM »
My warning system is not working.

The current Hazardous weather alert did not kick in

https://rms-weather.rdale.org/



You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Alerts not showing on website
« Reply #1 on: April 25, 2019, 08:56:12 PM »
I moved your question to a new topic in the Weather Website PHP scripting board.. the question fits better there.

Looking at a view-source of your page shows you're running advforecast2.php (JSON) - V5.10 - 13-Apr-2019 on PHP 5.3.28

It also shows
Quote
<!-- ALERTJSON
Array
(
    [@context] =>
    [@graph] => Array
        (
        )

    [title] => current watches, warnings, and advisories for Hennepin (MNZ060) MN
    [updated] => 2019-04-20T00:00:00+00:00
)
 -->
<!-- preparing 0 warning links -->
so there were no active warnings for MNZ060 on the api.weather.gov server.

I also noticed that several of the cache files are not able to be written .. perhaps you can create a ./cache/ directory and change the script to use that for writing cache files.. it will speed up the load of your site a bit since currently, without the cache files, a bunch of extra accesses need to be made to api.weather.gov on each page load.

Lastly, you're presenting your own display of icons/data from the script.  Does the home page also print the warnings (if any) using something like
Code: [Select]
  <p><?php
  
if ($forecastwarnings <> '') {
    print 
$forecastwarnings;
  }

?>
&nbsp;</p>


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 chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2846
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
Re: Alerts not showing on website
« Reply #2 on: April 26, 2019, 08:44:56 AM »
I made a separate page and folder
put in the code  and still nothing. No line-etc. It should have a hazardous Weather outlook

Real page with adv 4
https://rms-weather.rdale.org/

Fake page with adv 5 (not everything works-did not change other things)
https://rms-weather.rdale.org/testpage/weather.php


remember my code skills are put together with sticks and mud
« Last Edit: April 26, 2019, 08:47:32 AM by chief-david »



You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 951
    • LexMAWeather
Re: Alerts not showing on website
« Reply #3 on: April 26, 2019, 11:11:13 AM »
Early on Ken noted that the new NWS API doesn't include the Hazardous Weather Outlook that comes along with the old method of scraping the HTML off the forecast page.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2846
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
Re: Alerts not showing on website
« Reply #4 on: April 26, 2019, 11:45:35 AM »
Early on Ken noted that the new NWS API doesn't include the Hazardous Weather Outlook that comes along with the old method of scraping the HTML off the forecast page.
Missed that.  See, not a good coder. or reader.

I will leave it for now, running out of time today.



You can't phase me-I teach Middle School.
It's not you-It's WU.

 

anything