• Resolved Sloth Weather

    (@slothwx)


    I downloaded version 1.3.1 (new setup/install), built the database tables, and entered in the correct zip code, county, city, and state which has an active alert right now to test. When I enable the alert bar, nothing shows up in my header where it should be. When I put it as a widget, it shows ‘Data Error’. I can see the requests to “https://alerts…” go through our network and CAP doesn’t appear to be down on NOAA’s side at this moment at least.

    I tried entering another state’s address but still got the error and also tried the following website’s FAQ (waited a few hours on different computers and browsers) https://wordpress.org/plugins/national-weather-service-alerts/faq/.
    I don’t see any JS errors on the browser’s console log either.

    I appreciate this plugin and it is very nice.
    I am on an IIS server with everything updated regularly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Sloth Weather

    (@slothwx)

    I do get these errors when using this plugin in console.

    “Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys”

    “Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required”

    I do not have any errors when debugging logged in my log files on the server. Let me know if I can be of any assistance!

    Plugin Author John Russell

    (@laubsterboy)

    Hi slothwx,

    The first thing I would check is if you have php-curl installed and enabled or that in your php.ini “allow_url_fopen” is allowed so that simplexml_load_file can be used with an external URL.

    The console warnings that you’re receiving have no effect on the plugin pulling CAP data as that is performed by PHP on the backend.

    Please let me know if php-curl is enabled, or if allow_url_fopen is allowed (and simplexml is enabled), and you’re still getting the “Data Error”.

    -laubsterboy

    Thread Starter Sloth Weather

    (@slothwx)

    Hello laubsterboy,

    I do have curl and allow_url_fopen. I think I found the error (or issue) after digging further. When this plugin sends the xml request to alerts.weather.gov over https, my server sends back rst because it doesn’t like the certificate (fatal warning, certificate unknown) alerts.weather.gov sends back.

    The certificate that alerts.weather.gov sends back is a valid certificate (tested with openssl) but for some reason during the request over curl, gets messed up.

    I can bypass this and get alerts.weather.gov and https requests happy if I add the following line before $curl_data = curl_exec($curl);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); (yes, we want to verify certificates, I know.)

    I do have other curl requests on my site that work just fine. I am digging further to see what is going on. What do you think?

    recap: I do get NWS alerts when I set SSL not to verify the cert when this plugin sends the xml request, so it is a workaround.

    Thread Starter Sloth Weather

    (@slothwx)

    Go ahead and close this ticket. I made a change in my php.ini file and SSL is now working correctly.

    Plugin Author John Russell

    (@laubsterboy)

    Hi slothwx,

    Thanks for all of the troubleshooting and debugging information that you were able to provide. I’m glad that you were able to resolve the issue by changing your php.ini file.

    Also, I’ve decided to update the plugin to use wp_remote_get instead of manually using curl. This will use the WordPress core HTTP functions and classes and is more likely to be compatible with different servers.

    -laubsterboy

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘1.3.1 Data Error’ is closed to new replies.