I’ve been struggling to get my forecast to display correctly. I updated the advforecast2.php to the latest and its displaying the zone forecast but I’m getting the error “The detailed point forecast weather data is not currently available.The zone forecast data for MAZ012 (Southern Worcester) will be displayed until the point forecast data is again available.”
I’ve gone into view source to try and understand whats going on but no success. Also none of my other forecasts for towns in my pull down menu are working. I clearly need to change something.
and replace your V5 copy. It’s old, but still works with the current forecast.weather.gov site (but won’t when(if?) they switch forecast.weather.gov to the new website design) – their changover has been indefinitely delayed (at 1 year and counting now).
Your advforecast2.php is the V5.02 JSON version. No need to change your Settings.php, just download the script from https://saratoga-weather.org/advforecast2-V4.02.php?sce=view and save it as advforecast2.php, then upload to replace your copy.
I just put 4.03 in place to deal with the changes. I changed my NOAAZone and fileName to what I was using previously, but the forecast keeps coming up for Saratoga. Looks like it’s grabbing it from the NWSforecasts array. I’ve tried a few things, but can’t get it to use my location.
More busy… I’ve updated the advforecast2.php (JSON Version) to V5.05 and it has extra code to better handle redirects and failover to zone forecasts when needed.
It really irritates me that they’ve set the API for a point forecast to ALWAYS return a 301 to a gridpoint forecast instead of just returning the JSON requested. Grrrr… I’ve enabled curl to follow one redirect, set the timeout longer (6 seconds) and handle the muddled headers returning from a curl-fetch-with-redirect. Also set the point forecast life to be 18 hrs (instead of 12) to be ‘stale’ and fail over to the zone forecast.
Hopefully these mods will make our sites more stable while the api.weather.gov is still having flaky responses.
I’ve also decided to dual post the V4.04 and V5.05 versions of the script on the script page so there will be a durable link to the old (page scraper) script while the cutover to the new forecast.weather.gov is still pending.
Template users can pick up the updates at update tool page with a query of Base-USA, Plugin-*, 27-Feb-2018
I think I’ll rest up a bit… it’s been a busy day for NWS-related changes.
Is it still possible to get the 2-line icon display? I am not familiar with what changes they made as I never had a problem with my forecasts here but I notice the new code defaults to 1 line and I am not sure where/what to change.