I have a working local copy of the AresDebug and AresLog. I never managed to get Ares itself running locally (due to among other things database-stuff). Once there are clear plans for the future I will share this with whomever will be in charge of the community development (if they need it, and don't have a running version already).
Originally Posted by mazzinia
Anyway, I have found the culprit (it was actually due to an assumption I made that was incorrect):
the this.locCode should contain 'cityId:' before the number.
So we can either change line 161 in weather-data.jsjsjs
from: var feedURL = (this.WEATHER_FEED_URL + '?location=' + this.locCode + '&metric=' + this.metric + '&langid=' + $L('langCode')).replace(' ', '%20');
to : var feedURL = (this.WEATHER_FEED_URL + '?location=cityId:' + this.locCode + '&metric=' + this.metric + '&langid=' + $L('langCode')).replace(' ', '%20');
(only in the free app! - since the locCode-code was different in the payed app it would not have this problem)
or (and that would be the better solution*):
change line 259
from (original): this.locCode = localNode.getElementsByTagName('locationKey').childNodes.nodeValue;
from (patched): this.locCode = transport.request.url.substring(transport.request.url.indexOf("cityId:")+7,transport.request.url.ind exOf("&"));
to: this.locCode = transport.request.url.substring(transport.request.url.indexOf("cityId:"),transport.request.url.index Of("&"));
This will result in cityId to be added to the locCode, and as a result (possibly after cities are added again) create the correct URL (again, this only affects the free version).
* this should be better because it should now be correct for all places where the locCode is used and the 'cityId' formatting is assumed. So rather than patching up the effects of my mistake this would actually correct it
ps.TechTalk: my mistake would also cause incorrect cities to be added to the list, because AccuWeather's server stores all cities both in a 'cityId'-format and in a numerical format. The numbers are, however, not the same in both cases. So by using the locCode without cityId it would search for the wrong city...but only upon getting the locCode (without 'cityId') from the database.
Compare: http://accuwxiphonev4.accu-weather.c...=cityId:248272 (correct)
and: http://accuwxiphonev4.accu-weather.c...ocation=248272 (my mistake)
The city-number is the same, but due to the absence of the cityId-marker the results are different.