I can't figure out how to configure? I have install and placed in a block. It shows up on my site, but in my "modules" admin there is no "configure option" like for other modules.

I want to limit to local if possible, or have some flexibility in choosing cities.

Comments

BozHogan’s picture

Are you sure you're using version 7.x? I tried it and as soon as I enable the block, I get a WSOD with a PHP parse error on it. In any case, if you go to Admin > Structure > Block and look for the Block named "Multi Day Forecast", there is a configure link there. Don't know if this is what you're looking for, but HTH.

BozHogan

dwaine’s picture

Assigned: Unassigned » dwaine

Hi mgparrish,

To get to the nws_module specific configuration form try this url:
/admin/settings/nws_weather
You will find that the standard operation of nws_weather is to provide forecast data for a single location.

If you require data for multiple locations you'll need to call nws_weather functions directly. You can get a primer on that process in the -- ADVANCED USAGE -- section of the README.txt file.

Thanks

mgparrish’s picture

Yes, using 7.1.

In Admin > Structure > Block there is a config, but nothing to do with the default city.

thx

mgparrish’s picture

Seems even though I am logged in as admin I get a "Access denied" using that URL.

http://www.mywebsite.com/drupal//admin/settings/nws_weather/
and
http://www.mywebsite.com/drupal//admin/settings/nws_weather

"mywebsite" is of course for public example.

dwaine’s picture

Hi Mgparrish,

Your issue has been a bit of a mystery to me. I've done a series of tests. I also re-inspected the code. I think I found that the permissions have not been properly implemented and that the code currently allows only user #1 to configure the module.

If you view
http://www.mywebsite.com/user/1
you should see the account of the user that can access everything. Having 'administer' role is not enough. You need to be logged in as user #1. This 'super user' should have the ability to access the following url:
http://www.mywebsite.com/drupal/admin/settings/nws_weather
and configure the nws_weather specific options.

Let me know if logging in as user #1 does not allow you access to the configuration page.

Thanks
Dwaine

mgparrish’s picture

Dwain,

Thx. I'll check on that because I am using the 2nd admin account I created, not the 1st one, so I'll switch over to the original admin created and try. I will update here so that others can be advised.

mgparrish’s picture

Title: How to configure » After doing update to 7.x.1.1 now getting an error
Version: 7.x-1.0 » 7.x-1.1

My last check for updates it showed NWS had a new version so I ran the update, the earlier Version was not configured and set to the default city, now getting error as below ("mywebpage" in the URL is for security)

Notice: Undefined variable: result in nws_weather_NDFDgenByDay() (line 355 of /home/mywebpage/public_html/drupal/drupal/sites/all/modules/nws_weather/nws_weather.module)..

The weather data is not showing on the page anymore, just the error.

mgparrish’s picture

Dwain,

Loggin in as Super User, not just as an additional admin allows access to the config. thx

dwaine’s picture

Hi Mgparrish,

It sounds like utilizing user/1 account allowed you to configure the weather block. And it sounds like the block was displaying data properly. Until the update.

The PHP Notice you are receiving is a bug in my code that seems to be caused when the SOAP call returns no data. There is another bug report around this same issue. You can read it here:
http://drupal.org/node/1061876
Because you have already seen the block display weather data I would guess that you have SOAP connectivity. However, I would recommend double checking that lat/lon data on the NWS Weather configuration page. Remember, longitudes in the U.S. are always negative. Using a known valid lat/lon pairs is also a good idea while testing. Here is one:
L.A. CA : 34.06, -118.36
One more tidbit. This module caches the results of the SOAP call. You may need to 'clear all caches' to get the module to initiate a SOAP if it has already cached the results for a particular lat/lon.

Thanks
Dwaine

mgparrish’s picture

It's working now ... does seem likely it is when the SOAP call returns no data, would explain what I have seen. The service itself may not be really reliable. I'm not an expert at Drupal, but I wrote a PC app that would query the Shoucast servers for an updated Station list in XML. Sometimes the server would be overloaded at times and not return anything other than error. I looped the query until success, with a limited number of attempts then I would "die". It wouldn't handle any long term outage, so when the website was down for anything longer than my short loop then I would "die".

thx

dwaine’s picture

Status: Active » Fixed
dwaine’s picture

Status: Fixed » Closed (fixed)