This is a migrated thread and some comments may be shown as answers.

LinkedIn issue on IE7 (Q1 2012)

3 Answers 59 Views
SocialShare
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 2
Dan asked on 16 Apr 2012, 08:57 PM
Hey,
We've run up against a problem with the LinkedIn button in the newest version of the RadControls that doesn't seem to have been present in previous versions. When viewing our page in IE8 using either Compatibility mode or IE7 mode, clicking the LinkedIn button throws the following error:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; BRI/2; InfoPath.2; .NET CLR 1.1.4322; .NET4.0E; MALC)
Timestamp: Mon, 16 Apr 2012 17:03:09 UTC
 
Message: Object doesn't support this property or method
Line: 1765
Char: 1
Code: 0

When viewing in IE8 mode, however, the button works as expected. It also works under FF 11 and Chrome 18; Opera 11 opens the pop-up but appears blank. Anyone have any ideas as to what might be going on? I've checked the LinkedIn developer site and haven't found the exact same problem echoed so far.

3 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 17 Apr 2012, 02:28 PM
Hello Dan,

The LinkedIn Standard button (and the google and  facebook standard buttons for that matter) are prone to randomly throwing JavaScript errors when they are being created and/or clicked. This behavior is isolated to the scripts that come in from these networks and is out of our control. Quite often you will be able to replicate the same behavior without anything but the basic markup needed to add the button to the page, just as recommended in their own documentation.

What we have been able to determine improves the behavior slightly:
- adding two namespaces to the html element, as explained in the beginning of this help article.
- clearing the browser cache. Quite often simply fully reloading the page (ctrl+f5 in most browsers) resolves the problem.

You can also try adding the following script right after the script manager and before the RadSocialShare:
<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script>

I also recommend using the special class for the LinkedIn button and not setting the SocialNetType of a Styled button to LinkedInShare. If this behavior persists my best suggestion is to revert to the Styled button for LinkedIn by setting the SocialNetType to LinkedIn.

All the best,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Dan
Top achievements
Rank 2
answered on 17 Apr 2012, 07:27 PM
Thanks Marin,
It seems the steps you've outlined have fixed the Javascript error. Specifically, I added xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" to the page's <html> tag, and added <script src="http://platform.linkedin.com/in.js" type="text/javascript"></script> between the ScriptManager and RadSocialShare, and the errors disappeared. The LinkedIn pop-up is now stuck at a blank page titled "Processing", though (URL: http://platform.linkedin.com/js/xdrpc.html?v=0.0.1143-RC1.16308-1337). Do you have any further ideas as to how to resolve this newest problem? Either way, I'll continue to follow up on the LinkedIn forums to see what I can figure out.
0
Marin Bratanov
Telerik team
answered on 20 Apr 2012, 09:51 AM
Hello Dan,

This seems to be some security problem with their scripts. It has been reported for Opera and IE, see the following link: https://developer.linkedin.com/forum/uncaught-exception-referenceerror-security-error-attempted-read-protected-variable-getformhtml.

You can try including the other linked in framework script statically on the page, as its dynamic creation may somehow pose a problem for them.

It must also be placed before the RadSocialShare. 

I hope this will help, however - I cannot guarantee this. This matter is out of our hands since the entire functionality and thus problems come from their original scripts. What we do is merely add them to the page a provide simple properties to configure the button as their documentation suggests.

You can also revert to the Styled LinkedIn button as I suggested in my previous post to avoid using third party scripts. This will simply generate a URL and open the popup.


Greetings,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
SocialShare
Asked by
Dan
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Dan
Top achievements
Rank 2
Share this question
or