1. 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

Discussion in 'Resolved Bug Reports' started by digitalpoint, Oct 15, 2011.

  1. digitalpoint

    digitalpoint Well-Known Member

    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...
     
  2. Mike

    Mike XenForo Developer Staff Member

    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.)
     
  3. digitalpoint

    digitalpoint Well-Known Member

    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...

    [​IMG]

    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.
     
  4. Mike

    Mike XenForo Developer Staff Member

  5. Kier

    Kier XenForo Developer Staff Member

  6. Kier

    Kier XenForo Developer Staff Member

    ^ ninja'd by 20 minutes. That'll teach me not to refresh the page for ages while I go looking...
     
    Brandon Sheley likes this.
  7. Andy.N

    Andy.N Well-Known Member

    Or you can develop a function where it alerts you of new posts while you post you reply.
    Hint hint ;)
     
    BamaStangGuy and GeeksChat like this.
  8. digitalpoint

    digitalpoint Well-Known Member

    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)...
     
  9. Mike

    Mike XenForo Developer Staff Member

    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).
     
  10. digitalpoint

    digitalpoint Well-Known Member

    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...
     
  11. Mike

    Mike XenForo Developer Staff Member

    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 likes this.
  12. digitalpoint

    digitalpoint Well-Known Member

    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.
     
  13. Floren

    Floren Well-Known Member

    Yep, getting the same errors through a SSL connection, but only with Google+.

    js-error.jpg
     
  14. Dinh Thanh

    Dinh Thanh Well-Known Member

    Try to insert an youtube here to see if the errors occur.
     
  15. Dinh Thanh

    Dinh Thanh Well-Known Member

    I doesn't happen on this forum.
    Hi DigitalPoint, Did you fix this issue?

     

Share This Page