1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Theme not applying

Theme not applying

19 posts, 0 answered
  1. Garry
    Garry avatar
    52 posts
    Registered:
    04 Nov 2010
    08 Oct 2010
    Link to this post
    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!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    11 Oct 2010
    Link to this post
    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
  3. Garry
    Garry avatar
    52 posts
    Registered:
    04 Nov 2010
    11 Oct 2010
    Link to this post
    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
      
  4. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    08 Feb 2011
    Link to this post
    Dear Ivan

    This really seams to be an issue

    3 threads

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/bugs-issues/register-theme.aspx#1519226

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/creation-of-custom-theme-not-loading-appropriate-files.aspx

    Markus

    Anything on this ??
  5. OC
    OC avatar
    129 posts
    Registered:
    17 Nov 2004
    09 Feb 2011
    Link to this post
    I am having exact same problem...
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    11 Feb 2011
    Link to this post
    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
  7. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    11 Feb 2011
    Link to this post
    Dear Radoslav

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

    Markus
  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    16 Feb 2011
    Link to this post
    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
  9. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    16 Feb 2011
    Link to this post
    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
  10. OC
    OC avatar
    129 posts
    Registered:
    17 Nov 2004
    17 Feb 2011
    Link to this post
    In my case it was just a typo.

    Thanks,
    OC
  11. mcpdinkansas
    mcpdinkansas avatar
    102 posts
    Registered:
    22 Mar 2007
    14 Apr 2011
    Link to this post
    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?
  12. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    18 Apr 2011
    Link to this post
    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

  13. mcpdinkansas
    mcpdinkansas avatar
    102 posts
    Registered:
    22 Mar 2007
    18 Apr 2011
    Link to this post
    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
  14. mcpdinkansas
    mcpdinkansas avatar
    102 posts
    Registered:
    22 Mar 2007
    18 Apr 2011
    Link to this post
    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.
  15. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    18 Apr 2011
    Link to this post
    @mcpdinkansas I think in this case Ivan may actually be wrong, or providing you an incorrect sample. When referencing things like css or image files that are stored under App_Data (totally wrong IMO) as per SF recommendations you do NOT included "app_data" in the path. 

    So an image that's actually at:
    <img src="~/App_Data/Sitefinity/WebsiteTemplates/App_Themes/Magnetic/images/test.jpg" />

    should actually be referenced as:
    <img src="~/Sitefinity/WebsiteTemplates/App_Themes/Magnetic/images/test.jpg" />

    Give that a try.

    Phill
  16. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    18 Apr 2011
    Link to this post
    Hello Phill ,

    I am not referencing changing PATH in a template or widget that uses html or server control. I suggested that the FOLDER structure should be changed. Please read the post again.

    Greetings,
    Ivan Dimitrov
    the Telerik team

  17. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    18 Apr 2011
    Link to this post
    I see your point Ivan and didn't mean to offend. I worded it "may be wrong" because I know that your support is very solid, you've helped me on more than one occasion.

    Cheers,
    Phill
  18. Greg Umstead
    Greg Umstead avatar
    1 posts
    Registered:
    30 Jun 2009
    22 Dec 2011
    Link to this post
    Sounds silly but have you tried Ctrl-F5 when viewing page?
    We had a them that WOULD NOT apply no matter what we did and I think it was browser caching of a bad css file.  eventually Ctrl-F5 forced reload of css and it worked!
  19. Juan Sola
    Juan Sola avatar
    28 posts
    Registered:
    08 Jan 2007
    22 Dec 2011
    Link to this post
    Truthfully, at this point we are using 4.4 and I have worked with 4 so much I do not remember the solution this problem.

    @greg - yes you always need to refresh with sitefinity 4. It is a CACHE heavy app. I sometimes have to kill my localhost and restart for changes to take effect.
19 posts, 0 answered