Theme not applying - General Discussions - General Discussions - Progress Community
 General Discussions

Theme not applying

  • Theme not applying
  • Guys,
    I'm trying to start work on my new 4.0 Intranet site and first things first I want to create my theme for the site. However It does not appear to be applying. I am working through the Designer document and have created/uploaded my template, registered my theme in the Frontend settings, and have applied the theme to my page. Everything is based off of the Empty Template package at this point.

    In looking at the source for the generated page is the link path to the global .css files correct?

    Mine shows
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <link href="/WebResource.axd?d=6os7_s8o2zahCgVhj7LaoKlBvL3Q7dxxbDXlR1ZZDP6KPqZuD5y38F28F4TOAa42S8X41LaEeziSMi2uepuN2qRXNub_xfRUw42YbxQi4b8tymbd6bZOgvyPaddYNm02u2PHuMkBu7zBTbdtFXmbNsqwJ7jlyTx1yQxjKVndQvWiPsjw1DwUq2yGTh7ID1VE0&t=634220460671416016" rel="stylesheet" type="text/css" /><link href="/App_Data/Sitefinity/WebsiteTemplates/IntranetTemplate/App_Themes/DefaultTheme/global/Layout.css" type="text/css" rel="stylesheet" /><link href="/App_Data/Sitefinity/WebsiteTemplates/IntranetTemplate/App_Themes/DefaultTheme/global/Reset.css" type="text/css" rel="stylesheet" /><title>
        Child and Family Intranet (Home)
    </title></head>

    but when I'm editing in Expression Web I can manually link the stylesheet and it works, but the path looks like this.
    <head runat="server">
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <link href="../App_Themes/DefaultTheme/Global/Layout.css" rel="stylesheet" type="text/css" />
    </head>

    To test all I am doing is setting like the body background-color to blue or something, but the rendered Sitefinity page never changes nor do I see my css classes being rendered in the source.  

    Any advice would greatly be appreciated!
  • Hello Garry,

    The path to the stylesheet should be
    /Sitefinity/WebsiteTemplates/IntranetTemplate/App_Themes/DefaultTheme/global/Layout.css

    Most probably the theme has not been registered properly in Administration/Settings/ >> Appearance >> Frontend Themes

    The theme should be registered as shown below

    Path  - ~/App_Data/Sitefinity/WebsiteTemplates/IntranetTemplate/App_Themes/DefaultTheme

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Ivan,
    I checked my Theme Path and it looked exactly like yours, but for good measure I copied and pasted your path in and it does now work. No clue why.

    I will have to say though that when I was initially setting the path that if it was incorrect it does throw an application error as seen below. So when I no longer received the error I assumed I had my path correct. I did retest this and if you change any part of the now working path to something invalid, save changes, and then try and view a page with that theme applied you will in fact still get the Application Error.

    Anyhow resaving the Theme path seem to fix my hiccup.

    Thanks as always!


    Server Error in '/ChildandFamily' Application.
    --------------------------------------------------------------------------------
      
    Could not find a part of the path 'C:\Program Files (x86)\Telerik\Sitefinity SDK 4.0\Projects\ChildandFamily\default\Action\~App_Data\Sitefinity\WebsiteTemplates\IntranetTemplate\App_Themes\DefaultTheme\Global\'. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
      
    Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Telerik\Sitefinity SDK 4.0\Projects\ChildandFamily\default\Action\~App_Data\Sitefinity\WebsiteTemplates\IntranetTemplate\App_Themes\DefaultTheme\Global\'.
      
    Source Error: 
      
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
      
    Stack Trace: 
      
      
    [DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Telerik\Sitefinity SDK 4.0\Projects\ChildandFamily\default\Action\~App_Data\Sitefinity\WebsiteTemplates\IntranetTemplate\App_Themes\DefaultTheme\Global\'.]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +216
       System.IO.FileSystemEnumerableIterator`1.CommonInit() +386
       System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler) +798
       System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) +103
       System.IO.Directory.InternalGetFiles(String path, String searchPattern, SearchOption searchOption) +32
       Telerik.Sitefinity.Web.UI.ThemeController.GetExternalStyleSheets(ThemeElement theme, Page page) +235
       Telerik.Sitefinity.Web.UI.ThemeController.GetGlobalStyles(Page page) +802
       Telerik.Sitefinity.Web.RouteHandler.Handler_Load(Object sender, EventArgs e) +581
       System.Web.UI.Control.LoadRecursive() +95
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2760
      
       
      
      
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
  • Dear Ivan

    This really seams to be an issue

    3 threads

    www.sitefinity.com/.../register-theme.aspx

    www.sitefinity.com/.../creation-of-custom-theme-not-loading-appropriate-files.aspx

    Markus

    Anything on this ??
  • I am having exact same problem...
  • Hi Mutantmannen,

    Can you please make sure that you have used the correct path, the first problem has been proven to be a wrong path.

    @Markus, please make sure that the Application pool Identity has Full access tot he App_Data folder.

    Regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Dear Radoslav

    I have checked with my ISP and yes the app pool acording to them should have the rights to App_Data.

    Markus
  • Hello Markus Berchtold,

    Do you have a live link where we can observe this behavior? If yes please create a user for us, then open up a support ticket and send us the credentials as well as a link to the site. We will login remotely and inspect what might be wrong.

    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Dear Radoslav

    I have just ordered a V-Server.

    a) I need to know if more power helps SF Admin
    b) When I have set up my test site there I will test it again and then go through the proper support channel.

    But it could take a couple of days since I am working on other stuff as well.

    Markus
  • In my case it was just a typo.

    Thanks,
    OC
  • I am having the same issue:

    http://sitefinity4.1boc.net/

    As you can see, when you try to view the css using the url it gives you a 404. I have configured the theme settings path correct:

    "~/App_Data/Sitefinity/WebsiteTemplates/Magnetic/App_Themes/Magnetic"

    And I have made sure my App Pool Identity has full access/privileges to the App_Data folder.

    Any other thoughts on why my theme is not working?
  • Hi ,

    Can you change the folder structure from


    "~/App_Data/Sitefinity/WebsiteTemplates/Magnetic/App_Themes/Magnetic"

    to


    "~/App_Data/Sitefinity/WebsiteTemplates/App_Themes/Magnetic"

    Please check this article.



    Regards,
    Ivan Dimitrov
    the Telerik team

  • Hey Ivan,

    I will try your suggestion and see how it goes. Please note I based my current folder arch of of this article

    http://www.sitefinity.com/documentation/designers-guide/website-templates-file-structure.aspx
  • I tried the suggestion of moving the App_Themes folder directly under WebsiteTemplates folder and it did not work.

    It seems like it is a server setting that is causing this issue, I just can't find what it is. I've read Sitefinity 4 documentation and it states not changes are really needed to the server to run the website.