_spBodyOnLoadFunctionNames' is undefined Error on all Pages
-
Thursday, March 08, 2012 6:54 PM
Running into the following JavaScript errors on my SharePoint test site:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; .NET4.0C; .NET4.0E; MS-RTC LM 8)
Timestamp: Thu, 8 Mar 2012 17:48:28 UTC
Message: '_spBodyOnLoadFunctionNames' is undefined
Line: 122
Char: 1653
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: 'ContextInfo' is undefined
Line: 895
Char: 7
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1013
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1019
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1020
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1021
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1022
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1023
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1024
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1025
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1026
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1027
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1028
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1029
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1030
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1031
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1032
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1033
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 1043
Char: 115
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 232
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 204
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspx
Message: Object expected
Line: 232
Char: 1
Code: 0
URI: http://cot-sahara:10000/default.aspxThis all started after I ran the Products and Configuration Wizard to try and correct some problems with an Enterprise upgrade. It appears that all pages are not able to load the CSS properly. However, if I run IE with elevated privileges, everything looks just fine. I've scanned the forums and found a few posts related to correcting something within web.config but couldn't find any specific step-by-step instructions. Any help would be greatly appreciated.
All Replies
-
Monday, March 12, 2012 10:08 AMModerator
Hi Juan TF,
I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Meanwhile, you can try the ways below,
1. Recycle the IIS and clear the PC client IE data cache, check result.
2. Re-run the Products and Configuration Wizard (reboot server if needed), check result.
3. Re-create the AAM, check result.
Thanks
Daniel Yang
TechNet Community Support
-
Monday, March 12, 2012 4:36 PM
Hi Daniel,
Thank you for your response. I have attempted the steps you listed and unfortunately, the error is still present.
- Recycled IIS and cleared client cache (Done)
- Ran Products & Configuration Wizard (Completed successfully but Farm Configuration Wizard failed to launch after completion)
- Rebooted server
- Since this is just a test environment, I do not have any alternate access mappings configured. Not sure if I should be doing something differently here?
Previously, when I ran IE as an administrator, Central Admin appeared normal. Now I'm also experiencing the same problems even when I run with elevated privilege?
I'll await your next response. Thanks!
- Edited by Juan TF Monday, March 12, 2012 4:40 PM
-
Wednesday, March 14, 2012 8:52 PM
Hi Juan,
You might want to make sure if the firewall is not blocking the site / port:10000.
-
Thursday, March 15, 2012 4:24 PMThanks for the tip! I checked and there are no firewall issues for the port.
-
Friday, March 16, 2012 6:11 PM
Hi Juan,
You might want to run fiddler and netmon to observe the traffic flow.
Also, if you have multiple sharepoint servers on your farm, check if the files are missing/corrupt in 14 hive folder.
-
Friday, March 16, 2012 6:22 PM
Juan,
Also, if you have custom master page try changing the master page to v4.default, this might help you to narrow the problem.
some information about the java script _spBodyOnLoadFunctionNames: http://blogs.msdn.com/b/saurabhkv/archive/2009/06/22/javascript-pageload-add-function.aspx
-
Monday, March 19, 2012 7:01 AM
Hi,
Just cross check once whether all the share point default javascript files example: core.js and init.js files are loaded properly on the page.
Anil
-
Tuesday, March 20, 2012 3:30 PMI am getting the exact same behavior and it only presents itself in IE not in chrome or firefox.
-
Tuesday, March 20, 2012 3:43 PM
As best as I can tell, both files are being loaded properly.
<script type="text/javascript">RegisterSod("sp.core.js", "\u002f_layouts\u002fsp.core.js?rev=7ByNlH\u00252BvcgRJg\u00252BRCctdC0w\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("sp.res.resx", "\u002f_layouts\u002fScriptResx.ashx?culture=en\u00252Dus\u0026name=SP\u00252ERes\u0026rev=b6\u00252FcRx1a6orhAQ\u00252FcF\u00252B0ytQ\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("sp.ui.dialog.js", "\u002f_layouts\u002fsp.ui.dialog.js?rev=IuXtJ2CrScK6oX4zOTTy\u00252BA\u00253D\u00253D");RegisterSodDep("sp.ui.dialog.js", "sp.core.js");RegisterSodDep("sp.ui.dialog.js", "sp.res.resx");</script>
<script type="text/javascript">RegisterSod("core.js", "\u002f_layouts\u002f1033\u002fcore.js?rev=1VDxRR0oL3\u00252FEtgWNP2\u00252BGbQ\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("sp.runtime.js", "\u002f_layouts\u002fsp.runtime.js?rev=9sKdsC9N6p2BiRk3313M7Q\u00253D\u00253D");RegisterSodDep("sp.runtime.js", "sp.core.js");RegisterSodDep("sp.runtime.js", "sp.res.resx");</script>
<script type="text/javascript">RegisterSod("sp.js", "\u002f_layouts\u002fsp.js?rev=b0sEslB0uFZnnEZ33WjxOg\u00253D\u00253D");RegisterSodDep("sp.js", "sp.core.js");RegisterSodDep("sp.js", "sp.runtime.js");RegisterSodDep("sp.js", "sp.ui.dialog.js");RegisterSodDep("sp.js", "sp.res.resx");</script>
<script type="text/javascript">RegisterSod("cui.js", "\u002f_layouts\u002fcui.js?rev=k\u00252B4HtUzT9\u00252B3mSycgD7gPaQ\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("inplview", "\u002f_layouts\u002finplview.js?rev=lxCL6dT9E0o\u00252F9jNw7YlGng\u00253D\u00253D");RegisterSodDep("inplview", "core.js");RegisterSodDep("inplview", "sp.js");</script>
<script type="text/javascript">RegisterSod("ribbon", "\u002f_layouts\u002fsp.ribbon.js?rev=F\u00252BUEJ66rbXzSvpf7nN69wQ\u00253D\u00253D");RegisterSodDep("ribbon", "core.js");RegisterSodDep("ribbon", "sp.core.js");RegisterSodDep("ribbon", "sp.js");RegisterSodDep("ribbon", "cui.js");RegisterSodDep("ribbon", "sp.res.resx");RegisterSodDep("ribbon", "sp.runtime.js");RegisterSodDep("ribbon", "inplview");</script>
<script type="text/javascript">RegisterSod("msstring.js", "\u002f_layouts\u002f1033\u002fmsstring.js?rev=QtiIcPH3HV7LgVSO7vONFg\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("browserScript", "\u002f_layouts\u002f1033\u002fie55up.js?rev=UgTcwUTI6YcRzTMBxD93Xg\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("socialdata.js", "\u002f_layouts\u002fsocialdata.js?rev=srp8t6aZS\u00252FjdrW3\u00252FJrn1iQ\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("sp.ui.socialribbon.js", "\u002f_layouts\u002fsp.ui.socialribbon.js?rev=q7gLNDKo68UsaWoEc\u00252FZCug\u00253D\u00253D");RegisterSodDep("sp.ui.socialribbon.js", "ribbon");RegisterSodDep("sp.ui.socialribbon.js", "socialdata.js");</script>
<script type="text/javascript">RegisterSod("WPAdderClass", "\u002f_layouts\u002fwpadder.js?rev=hnGJJEMcU5XH\u00252BCq7PlSxJw\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSodDep("browserScript", "msstring.js");</script>
<script type="text/javascript">document.write('<script type="text/javascript" src="/_layouts/1033/init.js?rev=BjQJs0OCQh3Zfydsdw2MYw%3D%3D"></' + 'script>');
-
Tuesday, March 20, 2012 3:44 PM
Could this be where my problem lies?
if (typeof(_spBodyOnLoadFunctionNames) != "undefined") {
if (_spBodyOnLoadFunctionNames != null) {
_spBodyOnLoadFunctionNames.push("ExpDataViewGroupOnPageLoad");

