Closed (fixed)
Project:
Yr Weatherdata
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
5 Apr 2011 at 20:36 UTC
Updated:
30 Apr 2011 at 18:11 UTC
Jump to comment: Most recent
This causes errors from code in line 986 and 1175 in file yr_verdata.module.
All places with "[Cc]elcius" in yr_verdata.admin.inc (line 40, 41, 156) and yr_verdata.module (line 983, 1162, 1164, 1169, 1170, 1175 and 1183) must be changed to "[Cc]elsius".
After modification, setup for Yr Weatherdata must be updated to set correct value for temperature unit.
Comments
Comment #1
achilleas01 commentedthanks for the solution about the 'celsius' change...but there is a problem with weather icons that do not appear at all!!! the problem is at function
function theme_yr_verdata_symbol($vars) {
that can not provide the correct URL to icons that are located in the page
http://symbol.yr.no/grafikk/sym/b38/
a quick change that i have made in order to have icons appear again was:
function theme_yr_verdata_symbol($vars) {
switch ($vars['number']) {
case 1:
case 2:
case 3:
case 5:
case 6:
case 7:
case 8:
$url = 'http://symbol.yr.no/grafikk/sym/b38/0' . $vars['number'] . 'd.png';
break;
case 4:
$url = 'http://symbol.yr.no/grafikk/sym/b38/0' . $vars['number'] . '.png';
break;
default:
$url = 'http://symbol.yr.no/grafikk/sym/b38/' . $vars['number'] . '.png';
}
return theme('image', $url, $vars['name'], $vars['name'], NULL, FALSE);
}
but this does not take in account the time of the day in order to show the day icon or the night icon...
i am waiting for a better solution
Comment #2
reswild commentedLooks like you are missing case 9 in the code above.
I think it should be:
case 4:
case 9:
$url = 'http://symbol.yr.no/grafikk/sym/b38/0' . $vars['number'] . '.png';
break;
Comment #3
Anonymous (not verified) commentedI have the same issues.
Yesterday it just stopped workin.
I fixed the error generated by the spell
but I tried the above code for the images but it did'nt work.
Comment #4
tjodolv commentedHello there.
I will take a look at this later this week.Thanks for the feedback!It seems that yr.no changed their XML feeds, but I did not get notified, even though I signed up for their "developer mailing list". I'm working on a fix right now, and will ask them to change the feed back to the format they used the last year, because it required a lot less code to manage.
Comment #5
Anonymous (not verified) commentedCool!
Please keep us updated!
Comment #6
tjodolv commentedCommitted to dev. Pushing an update tonight after testing on one more server, because this is actually a critical issue.
Comment #7
tjodolv commentedThis should now work with the new releases 6.x-2.2 and 7.x-1.2 (skipped 6.x-2.1 for keeping the modules' release tags synced).
Please report any problems, and I'll work on them as soon as I can.
Comment #8
Anonymous (not verified) commentedIt works perfectly!
Thank you!
Comment #9
tjodolv commentedThis appears to be fixed :)