Theme not applying

Posted by Community Admin on 03-Aug-2018 15:40

Theme not applying

All Replies

Posted by Community Admin on 08-Oct-2010 00:00

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!

Posted by Community Admin on 11-Oct-2010 00:00

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

Posted by Community Admin on 11-Oct-2010 00:00

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
  

Posted by Community Admin on 08-Feb-2011 00:00
Posted by Community Admin on 09-Feb-2011 00:00

I am having exact same problem...

Posted by Community Admin on 11-Feb-2011 00:00

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

Posted by Community Admin on 11-Feb-2011 00:00

Dear Radoslav

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

Markus

Posted by Community Admin on 16-Feb-2011 00:00

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

Posted by Community Admin on 16-Feb-2011 00:00

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

Posted by Community Admin on 17-Feb-2011 00:00

In my case it was just a typo.

Thanks,
OC

Posted by Community Admin on 14-Apr-2011 00:00

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?

Posted by Community Admin on 18-Apr-2011 00:00

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


Posted by Community Admin on 18-Apr-2011 00:00

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

Posted by Community Admin on 18-Apr-2011 00:00

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.

Posted by Community Admin on 18-Apr-2011 00:00

@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

Posted by Community Admin on 18-Apr-2011 00:00

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


Posted by Community Admin on 18-Apr-2011 00:00

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

Posted by Community Admin on 22-Dec-2011 00:00

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!

Posted by Community Admin on 22-Dec-2011 00:00

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.

This thread is closed