1
Vote

Module Broken! Yahoo Changed API

description

I was checking a website today that uses this module and it no longer works. After Googling a bit I found this:

Yahoo effectively shut down its Weather API by forcing OAuth 1.0 and crippling it 27-Mar-2016

Any chance of getting a fixed version?

file attachments

comments

znoev wrote May 12, 2016 at 3:55 PM

Here is the fix that we've made so the module start working again:
  1. Fix the line in Settings.ascx:
From:
var id = arr[i].item.guid.content.substring(0, arr[i].item.guid.content.indexOf("_"));

To:
var id = arr[i].item.link.substring(arr[i].item.link.indexOf('-') + 1, arr[i].item.link.length - 1);

And:

From:
var cityId = arr[0].item.guid.content.substring(0, arr[0].item.guid.content.indexOf("_"));

To:
var cityId = arr[0].item.link.substring(arr[0].item.link.indexOf('-') + 1, arr[0].item.link.length - 1);
  1. Fix the line in View.acsx
From:
var query = "SELECT item FROM weather.forecast WHERE location = '" + cityId + "' and u='" + degreeUnits + "'";

To:
var query = "SELECT item FROM weather.forecast WHERE woeid = '" + cityId + "' and u='" + degreeUnits + "'";

Or download and overwrite the attached files!

djamell wrote Jun 28, 2016 at 12:56 PM

THANK YOU!!!!

Works like a champ now!