Closed (fixed)
Project:
U.S. National Weather Service
Version:
7.x-1.1
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
9 Feb 2011 at 18:00 UTC
Updated:
11 Mar 2011 at 22:38 UTC
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
Comment #1
BozHogan commentedAre 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
Comment #2
dwaine commentedHi 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
Comment #3
mgparrish commentedYes, using 7.1.
In Admin > Structure > Block there is a config, but nothing to do with the default city.
thx
Comment #4
mgparrish commentedSeems 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.
Comment #5
dwaine commentedHi 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
Comment #6
mgparrish commentedDwain,
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.
Comment #7
mgparrish commentedMy 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.
Comment #8
mgparrish commentedDwain,
Loggin in as Super User, not just as an additional admin allows access to the config. thx
Comment #9
dwaine commentedHi 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
Comment #10
mgparrish commentedIt'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
Comment #11
dwaine commentedComment #12
dwaine commented