Did the NWS change their format of their data or something? As of today, I am constantly getting the following errors every time it tries to pull the data from the nws site:

warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Start tag expected, '<' not found in C:\wamp\www\sites\all\modules\nws_weather\nws_weather.module on line 360.
# warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: unknown: NUMBER in C:\wamp\www\sites\all\modules\nws_weather\nws_weather.module on line 360.
# warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in C:\wamp\www\sites\all\modules\nws_weather\nws_weather.module on line 360.

Comments

wylbur’s picture

Getting the same error, but not sure how long this has been happening. The block is not showing.

JamesMarie’s picture

Same issue here - my client says it was working yesterday...?

greywolfsspirit’s picture

same here, worked fine yesterday, and it's not because I've made changes to my production site, my backup site which I have made no changes to at all is showing the same errors. I've had to disable the module for now until it straightens out.

bobsomebody’s picture

Having the same issue myself, I also have time to kill if you would like to email me some debug steps. On a side note thank you for the module its wonderful.

dwaine’s picture

Assigned: Unassigned » dwaine

I've seen this issue occur from time to time when NOAA delivers improper XML documents as its response to the SOAP call. These issues are usually temporary. But, I'd like to get some feedback to be sure the code is working as designed.

1. Are there any nws_weather users receiving these errors continuously and not seeing forecast data in the nws_weather block?

2. Are these warnings showing up in the DBlog where they belong or are they being displaying in the site?

greywolfsspirit’s picture

I was getting them for 2 weeks straight.. they have since stopped to where they are sporadic now. All my notices come up on screen and in my log.

dwaine’s picture

Hi greywolfsspirit,

Thanks for the information. I've reviewed the code for both the rc1 and latest Drupal 6.x versions and believe the code is functioning as intented.

As you know, if the NOAA server soap call returns improper XML (or an error, or no data) then the nws_weather module code won't be able to display any forecast information. I would guess that the NOAA station that delivers data for your chosen location is more error prone than average based on the frequency of the XML errors.

The other piece of the puzzle is how to handle the error messages. It is intended that the nws_weather module report errors only to the DBlog. But there is a setting here:
/admin/settings/error-reporting
that also echo's error (and warning) messages to the screen. Changing the dropdown option to the setting that reads:
Write errors to the log
Should hide those errors (and any others) from the users of the site.

One more thing. Can you post the lat/lon you have chosen? I'm curious to test my installation against the NOAA server that is causing such frequent XML errors.

Thanks
Dwaine

dwaine’s picture

Status: Active » Closed (fixed)