Uncaught ReferenceError: data is not defined on @version 3.0.2
delanthear opened this issue · comments
Apologies if this is a really numpty issue. I've inherited a site running a very old version of this script (1.2.1) and I'm trying to get it running again. The last time I had really anything to do with Javascript was in the early 2000s! :)
I've swapped out the old code for 3.0.2 and replace the host variable with the proxy version suggested here: #103 (comment)
but I'm getting:
vendor.js?ver=5.6.1:1706 Uncaught ReferenceError: data is not defined
at Object.success (vendor.js?ver=5.6.1:1706)
at c (jquery.min.js?ver=3.5.1:2)
at Object.fireWith [as resolveWith] (jquery.min.js?ver=3.5.1:2)
at l (jquery.min.js?ver=3.5.1:2)
at XMLHttpRequest.<anonymous> (jquery.min.js?ver=3.5.1:2)
1706 for me is:
function request_data(url, type, tries, callback, autoFallback, googlePrefix){
var prefixedUrl;
if(autoFallback && googlePrefix){
prefixedUrl = 'https://images' + ~~(Math.random() * 3333) + '-focus-opensocial.googleusercontent.com/gadgets/proxy?container=none&url=' + url;
}
$.get(prefixedUrl || url, function(response){
data = parse_response(type, response); <---
I guess this might not be related to this script and is something else loaded on the site, but some clues would be helpful if you have any!
Thanks!
er.. I just put a "var" before data on that line and it's now returning stuff. 😕
@jsanahuja,
I think we need this var
in
jquery.instagramFeed/jquery.instagramFeed.js
Line 150 in 559fc6c
don't we?
@jsanahuja,
I think we need thisvar
injquery.instagramFeed/jquery.instagramFeed.js
Line 150 in 559fc6c
don't we?
Definitely, feel free to do it if you want :)
Changes published in 3.0.3 release