Recently i encountered a weird issue in SharePoint 2013, when i click on any document library context menu it shows "Reference error:GetCtxRgiidFromlid is not defined" as shown below
After lot of googling and some hit and trial methods, i figured out that this issue is related to the sequence of SharePoint js files in my custom master page.
I used sp.init.js and sp.runtime.js and gave the reference as
<script src="/_layouts/15/sp.init.js"></script>
<script src="/_layouts/15/sp.runtime.js"></script>
I gave theses reference because i need to execute some functions (SharePoint jsom api) and these files were required.
But this lead to the reference error so i modified the custom master page and given the links as
<!--MS:<SharePoint:ScriptLink language="javascript" name="sp.runtime.js" OnDemand="true" runat="server" Localizable="false">-->
<!--ME:</SharePoint:ScriptLink>-->
<!--MS:<SharePoint:ScriptLink language="javascript" name="sp.init.js" OnDemand="true" runat="server" Localizable="false">-->
First sp.runtme.js is to be loaded then sp.init.js after doing these changes above error was gone.
Happy Coding !!
After lot of googling and some hit and trial methods, i figured out that this issue is related to the sequence of SharePoint js files in my custom master page.
I used sp.init.js and sp.runtime.js and gave the reference as
<script src="/_layouts/15/sp.init.js"></script>
<script src="/_layouts/15/sp.runtime.js"></script>
I gave theses reference because i need to execute some functions (SharePoint jsom api) and these files were required.
But this lead to the reference error so i modified the custom master page and given the links as
<!--MS:<SharePoint:ScriptLink language="javascript" name="sp.runtime.js" OnDemand="true" runat="server" Localizable="false">-->
<!--ME:</SharePoint:ScriptLink>-->
<!--MS:<SharePoint:ScriptLink language="javascript" name="sp.init.js" OnDemand="true" runat="server" Localizable="false">-->
First sp.runtme.js is to be loaded then sp.init.js after doing these changes above error was gone.
Happy Coding !!
No comments:
Post a Comment