Blog Archive

Thursday, September 8, 2011

Fixing JavaScript Errors in SharePoint

Most of the times in IE8 you must have seen that while loading SharePoint site IE shows some weird JavaScript Errors and some UI functions in the Ribbon don't work. Recently I have observed this with one of the client and on some machines we faced this issue,

After lots of googling and trying different things I found the solution, so I want to share this solution with you if you are facing the same issue.

Well, when the SharePoint site loads in the browser then it shows the error like this.

Error: 'SP.Res.autocompleteLoading' is null or not an object
Error: 'SP.Res.lcid' is null or not an object

and the Solution to this problem is, in IIS find the directory "/_vti_bin/sts" that has an Application Pool assigned as "SecurityTokenServiceApplicationPool", which sometimes does not exist. Change this Application Pool to your Site Application Pool and save. Again reload the page and the error gets vanished.

If this does not work with you try this thing.
In web.config, make sure the following section exists:

    <scriptresourcehandler enablecaching=”true” enablecompression=”false”>

First, make sure it’s not there already since that will generate errors. If it not there then put this section and recycle Application Pool and Check again...

Try if this works for you....