• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Browser issue Social Media Buttons Throwing Error

digitalpoint

Well-known member
#1
I didn't dig too much into it, but clicking any of the social media buttons *works*, but in the browser console, they throw JavaScript errors saying they are trying to do something outside of the frame.

Normally it wouldn't matter to much since it works, but it in turn kills a JavaScript callback I want to use when someone clicks a social media button.

Is XF trying to do some sort of callback on it's own that is failing? It only seems to be XF sites that I see the errors thrown in the console...
 

Mike

XenForo developer
Staff member
#2
I'm not noticing any errors in Firefox (or Chrome) here. Can you grab the error message and file/line number? (And a call stack would be useful, if something like Firebug will give it to you.)
 

digitalpoint

Well-known member
#3
Hmmm... not seeing it with Firefox, so maybe it's just a Webkit thing... If I click any one of the social media buttons, the action itself works, but the console instantly shows the following 3 errors when you click any one of them...



I tested on a bunch of other sites... my own, cnn.com, etc. and you never see such errors... but testing on a few XF sites, all exhibit the errors.

There has to be some sort of special callback you guys are doing somewhere... why else would clicking the "Tweet" button try to access the Facebook or Google+ frame?

Again, it wouldn't be a huge deal, except I'm trying to do my OWN callback, which fails because whatever else is trying to happen is crapping out.
 

digitalpoint

Well-known member
#8
Is it a callback you guys are using for it? Seems strange that it works fine on my non-XF sites (and I am using the JS callbacks for the social media buttons)...
 

Mike

XenForo developer
Staff member
#9
No we're doing nothing - you can see the same issue on that Mashable page and you'll find various other references. It seems to happen if you have multiple iframes (so with only one type, it won't happen).
 

digitalpoint

Well-known member
#10
Check forums.digitalpoint.com... I have the same 3 iframes, and there are no issues (and I certainly didn't do anything special to prevent them).

Maybe some library you guys are using is automatically attaching a JS listener to it that it shouldn't be or something... Hmmm...
 

Mike

XenForo developer
Staff member
#11
I get the issues there too. :)

Code:
Unsafe JavaScript attempt to access frame with URL [URL]http://forums.digitalpoint.com/showthread.php?t=2321330#post16947966[/URL] from frame with URL [URL]https://plusone.google.com/u/0/_/+1/fastbutton?url=http%3A%2F%2Fforums.digitalpoint.com%2Fshowthread.php%3Ft%3D2321330&size=medium&count=true&annotation=&hl=en-US&jsh=r%3Bgc%2F25095437-ce843676#id=I1_1320432949577&parent=http%3A%2F%2Fforums.digitalpoint.com&rpctoken=387933576&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe[/URL]. Domains, protocols and ports must match.
2Unsafe JavaScript attempt to access frame with URL [URL]http://forums.digitalpoint.com/showthread.php?t=2321330#post16947966[/URL] from frame with URL [URL]http://platform.twitter.com/widgets/tweet_button.html#_=1320432949475&count=horizontal&id=twitter_tweet_button_0&lang=en&original_referer=http%3A%2F%2Fforums.digitalpoint.com%2Fshowthread.php%3Ft%3D2321330%23post16947966&related=digitalpoint&text=Getting%20a%20new%20account%20after%20ban&url=http%3A%2F%2Fforums.digitalpoint.com%2Fshowthread.php%3Ft%3D2321330[/URL]. Domains, protocols and ports must match.
Unsafe JavaScript attempt to access frame with URL [URL]https://www.facebook.com/plugins/like.php?api_key=107355682633601&channel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df1b8fbfec8%26origin%3Dhttp%253A%252F%252Fforums.digitalpoint.com%252Ff104125acc%26relation%3Dparent.parent%26transport%3Dpostmessage&extended_social_context=false&font=tahoma&href=http%3A%2F%2Fforums.digitalpoint.com%2Fshowthread.php%3Ft%3D2321330&layout=button_count&locale=en_US&node_type=link&sdk=joey&show_faces=false&width=150[/URL] from frame with URL [URL]http://platform.twitter.com/widgets/tweet_button.html#_=1320432949475&count=horizontal&id=twitter_tweet_button_0&lang=en&original_referer=http%3A%2F%2Fforums.digitalpoint.com%2Fshowthread.php%3Ft%3D2321330%23post16947966&related=digitalpoint&text=Getting%20a%20new%20account%20after%20ban&url=http%3A%2F%2Fforums.digitalpoint.com%2Fshowthread.php%3Ft%3D2321330[/URL]. Domains, protocols and ports must match.
Unsafe JavaScript attempt to access frame with URL [URL]https://plusone.google.com/u/0/_/+1/fastbutton?url=http%3A%2F%2Fforums.digitalpoint.com%2Fshowthread.php%3Ft%3D2321330&size=medium&count=true&annotation=&hl=en-US&jsh=r%3Bgc%2F25095437-ce843676#id=I1_1320432949577&parent=http%3A%2F%2Fforums.digitalpoint.com&rpctoken=387933576&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe[/URL] from frame with URL [URL]http://platform.twitter.com/widgets/tweet_button.html#_=1320432949475&count=horizontal&id=twitter_tweet_button_0&lang=en&original_referer=http%3A%2F%2Fforums.digitalpoint.com%2Fshowthread.php%3Ft%3D2321330%23post16947966&related=digitalpoint&text=Getting%20a%20new%20account%20after%20ban&url=http%3A%2F%2Fforums.digitalpoint.com%2Fshowthread.php%3Ft%3D2321330[/URL]. Domains, protocols and ports must match.
 

digitalpoint

Well-known member
#12
Yeah, sorry... I stand corrected. I was just coming here to post that I actually *do* get the errors. Strange though that I didn't before. Maybe something in the newer versions of WebKit make it more prevalent.

Definitely rather strange that ANY of them would be trying to access things in other iframes.
 

dihuta

Formerly Dinh Thanh
#15
I doesn't happen on this forum.
Hi DigitalPoint, Did you fix this issue?

I didn't dig too much into it, but clicking any of the social media buttons *works*, but in the browser console, they throw JavaScript errors saying they are trying to do something outside of the frame.

Normally it wouldn't matter to much since it works, but it in turn kills a JavaScript callback I want to use when someone clicks a social media button.

Is XF trying to do some sort of callback on it's own that is failing? It only seems to be XF sites that I see the errors thrown in the console...