0

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>
1
  • Still no answer to this... Commented May 1, 2012 at 0:14

1 Answer 1

1

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"
     EnableScriptGlobalization="false" 
     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.

1
  • 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. Commented May 1, 2012 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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