Author Topic: advisorybox does not work  (Read 495 times)

0 Members and 1 Guest are viewing this topic.

Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
advisorybox does not work
« on: March 26, 2024, 06:13:37 PM »
Hello, the advisorybox that I have included on the website does not work for me. Right now there is a warning issued by the meteorological agency and it does not indicate it. Furthermore, I get the feeling that it damages the presentation of the website, since it takes too long to load.

https://www.meteosanjuan.com/

What can I do to solve?

Thanks

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: advisorybox does not work
« Reply #1 on: March 26, 2024, 06:48:29 PM »
I did a view-source of your wxadvisory.php?force=1 to cause the script to fetch the data from meteoalarm.org

It showed
Quote
<!-- Fetch Status:
get-meteoalarm-warning-inc.php (976) ES_warnings: time spent: 30.0015 -  invalid CURL Connection timed out after 30001 milliseconds https://feeds.meteoalarm.org/api/v1/warnings/feeds-spain
get-meteoalarm-warning-inc.php(386) invalid data load

 -->

So the problem with the long delay (sometimes) when loading your page is due to the connectivity between your webserver and feeds.meteoalarm.org server.  It is something that the technical support of your hoster will need to address.
When I load that feed, it takes 5 seconds to load the 1.6Mbytes of XML.

because the connection is timing out and not getting fresh data, it shows there are no alerts available.
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 meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: advisorybox does not work
« Reply #2 on: March 26, 2024, 07:29:19 PM »

The thing is, it worked before. Ok, let's see how I get that to the hosting provider.

Thanks Ken

Offline meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: advisorybox does not work
« Reply #3 on: March 27, 2024, 08:40:58 AM »
Ken, would it be difficult to temporarily deactivate the advisorybox while they solve the problem? I'm afraid my ISP won't listen to me.

Thanks

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: advisorybox does not work
« Reply #4 on: March 27, 2024, 10:27:13 AM »
Not at all difficult.

In Settings.php, change
Quote
$SITE['useMeteoalarm'] = true;
to
Quote
$SITE['useMeteoalarm'] = false;
and both the home page and wxadvisory.php will not try to load get-meteoalarm-warning-inc.php
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 meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: advisorybox does not work
« Reply #5 on: March 27, 2024, 04:59:02 PM »

Thanks Ken, I take note. Incredibly it works again and it hasn't been working for weeks and I haven't even contacted my ISP. So for now I'll leave it as is.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: advisorybox does not work
« Reply #6 on: March 27, 2024, 05:42:00 PM »
Some say "Internet happens"  :roll:  #-o (with a small snark in their voice).

There was likely a transient routing issue from your webserver to the feeds.meteoalarm.org webserver.

It's now responding to your query of it with < 1 second time
Quote
get-meteoalarm-warning-inc.php (980) ES_warnings: time spent: 0.8225 -  CURL OK for https://feeds.meteoalarm.org/api/v1/warnings/feeds-spain
Glad it's working for you again.
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 meteosanjuan

  • Senior Member
  • **
  • Posts: 60
    • Meteosanjuan
Re: advisorybox does not work
« Reply #7 on: March 27, 2024, 06:14:25 PM »
Glad it's working for you again.

How great you are Ken, thanks to you for always being there.