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!
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
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.
Go ahead and close this ticket. I made a change in my php.ini file and SSL is now working correctly.
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