0

I am able to see the the javascript files and css files in the code from the F12 Developer tools but the scripts/CSS files only load when i am logged in the Anonymous User it does not load. Is there anything i am doing wrong here is the code i am using at the moment.

<!--MS:<SharePoint:CssRegistration ID="CSSRegistration1" Name="&#60;% $SPUrl:~sitecollection/_catalogs/masterpage/AFLLCCustomTemplate/Scripts/jquery/themes/AFLLCMainTheme/jquery.ui.all.css %&#62;" After="corev15.css" runat="server">-->
    <!--ME:</SharePoint:CssRegistration>-->
    <!--MS:<SharePoint:CssRegistration ID="CSSRegistration2" Name="&#60;% $SPUrl:~sitecollection/_catalogs/masterpage/AFLLCCustomTemplate/Styles/AFLLCCustomTemplate.css %&#62;" After="corev15.css" runat="server">-->
    <!--ME:</SharePoint:CssRegistration>-->
    <!--MS:<SharePoint:CssRegistration ID="CSSRegistration3" Name="&#60;% $SPUrl:~sitecollection/_catalogs/masterpage/AFLLCCustomTemplate/Styles/AFLLCCustomTemplateMenu.css %&#62;" After="corev15.css" runat="server">-->
    <!--ME:</SharePoint:CssRegistration>-->
    <!--MS:<SharePoint:CssRegistration ID="CSSRegistration4" Name="&#60;% $SPUrl:~sitecollection/_catalogs/masterpage/AFLLCCustomTemplate/Styles/AFLLCCustomTemplateSearch.css %&#62;" After="corev15.css" runat="server">-->
    <!--ME:</SharePoint:CssRegistration>-->
    <!--MS:<SharePoint:CssRegistration ID="CSSRegistration5" Name="&#60;% $SPUrl:~sitecollection/_catalogs/masterpage/AFLLCCustomTemplate/Styles/AFLLCCustomTemplateSocialMedia.css %&#62;" After="corev15.css" runat="server">-->
    <!--ME:</SharePoint:CssRegistration>-->
    <!--MS:<SharePoint:ScriptLink ID="ScriptLink7" OnDemand="false" LoadAfterUI="false" Localizable="false" Name="~SiteCollection/_catalogs/masterpage/AFLLCCustomTemplate/Scripts/jquery/js/jquery.js" runat="server" language="javscript">-->
    <!--ME:</SharePoint:ScriptLink>-->
    <!--MS:<SharePoint:ScriptLink ID="ScriptLink8" OnDemand="false" LoadAfterUI="false" Localizable="false" Name="~SiteCollection/_catalogs/masterpage/AFLLCCustomTemplate/Scripts/jquery/js/jquery-ui.js" runat="server" language="javscript">-->
    <!--ME:</SharePoint:ScriptLink>-->
    <!--MS:<SharePoint:ScriptLink ID="ScriptLink9" OnDemand="false" LoadAfterUI="false" Localizable="false" Name="~SiteCollection/_catalogs/masterpage/AFLLCCustomTemplate/Scripts/jquery/js/jquery.resize.js" runat="server" language="javscript">-->
    <!--ME:</SharePoint:ScriptLink>-->
    <!--MS:<SharePoint:ScriptLink ID="ScriptLink10" OnDemand="false" LoadAfterUI="false" Localizable="false" Name="~SiteCollection/_catalogs/masterpage/AFLLCCustomTemplate/Scripts/AFLLCMenuScripts.js" runat="server" language="javscript">-->
    <!--ME:</SharePoint:ScriptLink>-->
    <!--MS:<SharePoint:ScriptLink ID="ScriptLink14" OnDemand="false" LoadAfterUI="false" Localizable="false" Name="~SiteCollection/_catalogs/masterpage/AFLLCCustomTemplate/Scripts/AFLLCMenuWidget.js" runat="server" language="javscript">-->
    <!--ME:</SharePoint:ScriptLink>-->
    <!--MS:<SharePoint:ScriptLink ID="ScriptLink11" OnDemand="false" LoadAfterUI="false" Localizable="false" Name="~SiteCollection/_catalogs/masterpage/AFLLCCustomTemplate/Scripts/SocialMediaWidget.js" runat="server" language="javscript">-->
    <!--ME:</SharePoint:ScriptLink>-->
    <!--MS:<SharePoint:ScriptLink ID="ScriptLink12" OnDemand="false" LoadAfterUI="false" Localizable="false" Name="~SiteCollection/_catalogs/masterpage/AFLLCCustomTemplate/Scripts/SiteSettingsWidget.js" runat="server" language="javscript">-->
    <!--ME:</SharePoint:ScriptLink>-->
    <!--MS:<SharePoint:ScriptLink ID="ScriptLink13" OnDemand="false" LoadAfterUI="false" Localizable="false" Name="~SiteCollection/_catalogs/masterpage/AFLLCCustomTemplate/Scripts/AFLLCCustomTemplate.js" runat="server" language="javscript">-->
    <!--ME:</SharePoint:ScriptLink>-->
3
  • Well...you commented everything out for starters.
    – jpollar
    Jan 13, 2016 at 22:39
  • Are all the files not loading or just the custom files? Make sure the files are checked in and the user has access to them. Jan 13, 2016 at 22:45
  • they are not commented out that is how they look when creating master page from a html file. when copied to the server it automatically fills in the correct code. I did get an answer this was an execute problem. so when i moved the custom coded files to the site assets folder and retried it worked like a charm. Jan 14, 2016 at 22:44

2 Answers 2

1

Moving the files to the SiteAssets folder allowed the files to run correctly.

1
  • Accept your own answer as answer to the question, so it will not show in unanswered questions.
    – P S
    Sep 8, 2017 at 8:45
0

Maybe it is that simple: did you check if your script/css-files in the library are checked in and published (main version?).

Anonymous user only see main/published versions, while you, as you have edit permissions, are allowed to see files in draft-mode too.

Your Answer

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

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