Sandbox theme throws an exception with SharePoint Foundation 2013

Our sandbox themes are made in a way that all the resources are loaded from the root of the site collection, this causes an exception with the SharePoint Foundation because this feature is not included in this particular version.

If you are getting an error like the one bellow, please follow this steps in order to get the theme working.

 Site_Exception.png

  1. Open your site with SharePoint designer
  2. Go to All Files -> _catalogs -> masterpage -> YourThemeName
  3. Right click on the master page, check it out and edit it in advanced mode
  4. Search for the css calls, they are like the one exemplified bellow, and delete them from the masterpage (you have to delete it, if comment the code the error will persist)
    <SharePoint:CssRegistration name="<%$SPUrl:~sitecollection/_catalogs/masterpage/ YourThemeName/ YourThemeName.css%>" runat="server" after="SharepointCssFile" /> 
    <SharePoint:CssRegistration name="<%$SPUrl:~sitecollection/_catalogs/masterpage/ YourThemeName/css/widgets.css%>" runat="server" after="SharepointCssFile" />
    <SharePoint:CssRegistration name="<%$SPUrl:~sitecollection/_catalogs/masterpage/ YourThemeName /COREV15.css%>" runat="server" after="SharepointCssFile" />
  5. Replace it by the ones bellow (you have to adjust the URL according with your theme name)
    <link rel="stylesheet" href="/Style Library/YourThemeName/YourThemeName.css" type="text/css"/>
    <link rel="stylesheet" href="/Style Library/YourThemeName/css/widgets.css" type="text/css"/>
    <link rel="stylesheet" href="/Style Library/YourThemeName/COREV15.css" type="text/css"/>
  6. Save the master page and check it in.
Have more questions? Submit a request

Comments

BindTuning logo
Copyright Ⓒ 2021 Bind.
All rights reserved.
Privacy Policy
Cookie Policy
BindTuning
              Linkedin BindTuning Twitter BindTuning YouTube BindTuning Instagram BindTuning
              Facebook
Powered by Zendesk