Question

Recently in SharePoint 2010 I've been seeing this stupid 'Type' is undefined error loading the Microsoft Ajax Framework.

Now can anyone shed some light into what would cause this to start happening today but not yesterday? Ya we upgraded the env.

What can be done to fix this problem?

I would like to rant here about how f'n crappy the MS Ajax Framework is, but I really hope someone else has this problem and can provide a quick solution. Do we really need to copy MicrosoftAjax to the layouts folder and reference it in the page - because that causes a tremendous number of other issues? Yes, there is a script manager in the master page directly inside the form tag. Yes I'm registering a script link to "SP.js". What gives?

Was it helpful?

Solution 2

I installed an update to Chrome and it resolved this issue. I believe it was an issue with GZIP compression and NOT an issue with SharePoint. I can no longer reproduce the issue.

OTHER TIPS

I had this error and found that it went away if I made sure to set the Defer property on the ScriptLink to "true".

<SharePoint:ScriptLink runat="server" Name="SP.js" Localizable="false" Defer="true" /> 

Whenever that property was false, it would throw the error you noted.

Note I suspect you could also fix the issue by setting the LoadScriptsBeforeUI property on the ScriptManager to true, but I'm not positive that's the case since I don't know where the scriptmanager injects it's references, and if they would necessary be before the references generated by the ScriptLink

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top