I have an issue where scripts are loading multiple times causing the Welcome menu (by the users name in the header) to have multiple references "My profile" and "My Site"

I have the issue on both the custom master page and the unmodified v4.master inspecting with firebug reveals SP.UI.MyLinksRibbon.js being loaded dynamically multiple times.

<script type="text/javascript" src="/_layouts/SP.UI.MyLinksRibbon.js"></script>
<script type="text/javascript" src="/_layouts/SP.UI.MyLinksRibbon.js"></script>
  • Still no answer to this... – Ben Shoemate May 1 '12 at 0:14

This problem on occurs when images are loaded into a custom webpart via a javascript template. I think the scriptmanager:

<asp:ScriptManager id="ScriptManager" runat="server"  
     EnablePageMethods="false" EnablePartialRendering="true"
     EnableScriptLocalization="true" />

This includes a call to ExecuteOrDelayUntilScriptLoaded(_myLinksRibbonLoad2, 'SP.Ribbon.js'); The js returns a "loaded" response to the function for each image which causes it to fire each time, loading the script into the header.

| improve this answer | |
  • I tried loading the images only after the page loads with a jquery ready block. The problem still occurs. Something in the load event is trigging the script to get loaded muliple times. – Ben Shoemate May 1 '12 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.