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>-->
  • Well...you commented everything out for starters. – jpollar Jan 13 '16 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. – Shashank Reddy K Jan 13 '16 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. – Scott Wagner Jan 14 '16 at 22:44
1

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

  • Accept your own answer as answer to the question, so it will not show in unanswered questions. – P S Sep 8 '17 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, privacy policy and cookie policy

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