Error Message Help

Discussions of bugs found in com_eweather_1.3.x

Re: Error Message Help

Postby Bob » Wed Jul 08, 2009 9:49 am

Hey, Tinky... Could you email me a copy of your components\eWeather\weather.main.php file? I'm looking at an unmodified version, and I'm not sure if it is the same as yours :) My email address is bob.lavey@robertjlavey.com

Thanks a lot for posting your XML file. It seems to me that the <lnks> tag is causing the problem, since the PHP code I'm looking at doens't handle that case. What I don't understand is why the Current Conditions work, since the <cc> element is after the <lnks> tag in your XML. I'd expect the parser to blow up on the <lnks> element and never process the <cc>. Hopefully your weather.main.php file will help me understand :)

Thanks,
Bob
Bob
 
Posts: 525
Joined: Fri Apr 17, 2009 6:28 pm

Re: Error Message Help

Postby drystonewall » Wed Jul 08, 2009 9:55 am

Hi Bob.

I can confirm that the XML is in the same format as the one Tinky Winky has provided (couldn't post it - it was returning a mysql error on your site). Anything more you need from me?

Update: FYI, When I reinstalled the eweather component, I used the one I downloaded from your site yesterday - changed the URL string in eweather.main to include "Links" & "Prod" as before to resolved the XML - and I am back the issue of no 5-day forecast. Hope that helps?

Claire
:)
Last edited by drystonewall on Wed Jul 08, 2009 10:01 am, edited 1 time in total.
drystonewall
 
Posts: 9
Joined: Tue Jul 07, 2009 11:58 am

Re: Error Message Help

Postby Judboy » Wed Jul 08, 2009 9:56 am

My eWeather is also not showing the 5 or 10 day forcast, just current conditions. I have e-mailed you my eweather.main.php file as well. Thanks.
Judboy
 
Posts: 5
Joined: Tue Jul 07, 2009 9:10 am

Re: Error Message Help

Postby Bob » Wed Jul 08, 2009 9:56 am

Yay! I'm getting lots of good data from your guys. Thanks a lot for all your help!

Claire, I think I have everything I need. I have the data that's being returned from The Weather Channel, and I have the weather.main.php file that shoudl parse the data. Hopefully that will lead me to the solution :)

Bob
Bob
 
Posts: 525
Joined: Fri Apr 17, 2009 6:28 pm

Re: Error Message Help

Postby Bob » Wed Jul 08, 2009 10:46 am

Ha! That took a lot longer for me to find than it's going to take you guys to fix :)

In your components\com_eweather_1.1.0\com_eweather\eweather.php file (not in admin), there is this chunk of code:
Code: Select all
     if (isset($detail_view)){
         HTML_weather::displayDetailForecast($weatherClass->dayf_forecasts[$detail_view], $weatherIconsStyle, $weatherClass->dayf_lastupdate, $weatherClass->h_speed, $weatherClass->h_temp, $weatherDetailDateFormat);
     } elseif (($weatherClass->n_channels == 4) && ($weatherShowForecast == "1")) {
         HTML_weather::displayForecast($weatherClass, $weatherIconsStyle, $weatherShortDateFormat);
     }


That bit about ($weatherClass->n_channels == 4) is checking the number of direct child elements under the <weather> element. Before The Weather Channel started adding the <lnks> element, there were exactly 4: <head>, <loc>, <cc>, and <dayf>. With <lnks> there are now 5, so that elseif fails, and the forecast is not displayed.

All you need to do is change the above code to this:
Code: Select all
     if (isset($detail_view)){
         HTML_weather::displayDetailForecast($weatherClass->dayf_forecasts[$detail_view], $weatherIconsStyle, $weatherClass->dayf_lastupdate, $weatherClass->h_speed, $weatherClass->h_temp, $weatherDetailDateFormat);
     } elseif (/*($weatherClass->n_channels == 4) &&*/ ($weatherShowForecast == "1")) {
         HTML_weather::displayForecast($weatherClass, $weatherIconsStyle, $weatherShortDateFormat);
     }


That's it! That's the same change I have in the 1.3.x version s of eWeather for Joomla 1.5.x, so I'm confident it works.

Do you feel comfortable making that code change? I hope so :) You guys seem pretty self-sufficient!

Holler if this doesn't help.

Thanks,
Bob
Bob
 
Posts: 525
Joined: Fri Apr 17, 2009 6:28 pm

Re: Error Message Help

Postby TinkyWinky » Wed Jul 08, 2009 10:51 am

TinkyWinky
 
Posts: 4
Joined: Tue Jul 07, 2009 1:55 pm

Re: Error Message Help

Postby Bob » Wed Jul 08, 2009 10:53 am

Yay! Thanks for letting me know, TinkyWinky.
Bob
 
Posts: 525
Joined: Fri Apr 17, 2009 6:28 pm

Re: Error Message Help

Postby Judboy » Wed Jul 08, 2009 11:07 am

Fixed here as well. Is the 10-day forecast gone for good from the XML feed?
Judboy
 
Posts: 5
Joined: Tue Jul 07, 2009 9:10 am

Re: Error Message Help

Postby Judboy » Wed Jul 08, 2009 11:14 am

I got a crazy observation, on the Weather Module it displays Wind Chill and I have also noticed Heat Index last year in its place. I notice that this summer it is still listed as Wind Chill and I assume it is because the Weather Channel has not changed it. Is there a way I can change it back and forth or is it totally up to them?
Judboy
 
Posts: 5
Joined: Tue Jul 07, 2009 9:10 am

Re: Error Message Help

Postby Bob » Wed Jul 08, 2009 11:18 am

I'm glad you're working also, Jud.

Yes, I think 10-day forecasts are gone now. I noticed that right away when I was porting eWeather to Joomla 1.5.x.

Wind Chill versus Heat Index... Good question. I had not even noticed one versus the other. It's something that could be worked out in the eWeather code I think. If the value is larger than the current temp, it's a Heat Index; otherwise it's a Wind Chill. If it was working at one time, it would be a Weather Channel thing, though. There's not anything that I'm aware of that would do this in eWeather.

If I did implement this, it would only be in eWeather 1.3.x. I'm not supporting 1.1.0. Sorry.

Thanks,
Bob
Bob
 
Posts: 525
Joined: Fri Apr 17, 2009 6:28 pm

PreviousNext

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest