CSS for Themes not loading (404)

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

CSS for Themes not loading (404)

All Replies

Posted by Community Admin on 19-Sep-2011 00:00

I deployed my Sitefinity 4.2 website to IIS 6.  However, I noticed that the CSS was not loading.  I am receiving a 404 error for the CSS file.

The page appears to be referencing the stylesheet correctly:

<head><title>
    Home
</title>
   
    <!-- No tags beyond this point -->
<meta name="Generator" content="Sitefinity 4.2.1650.0 SE" /><link href="/Sitefinity/WebsiteTemplates/App_Themes/HealthChoice/global/ie7.css" type="text/css" rel="stylesheet" /><link href="/Sitefinity/WebsiteTemplates/App_Themes/HealthChoice/global/style.css" type="text/css" rel="stylesheet" /></head>

How can I get the stylesheet to show?  Thanks.

Posted by Community Admin on 19-Sep-2011 00:00

Hi Ryan Dailey,

 This is because of the names of the CSS files that you have put inside the "Global" folder. Sitefinity has strict mappings for names, so you should follow exactly this folder structure, when creating themes:
http://www.sitefinity.com/documentation/designers-guide/website-templates-file-structure.aspx
Inside the Global folder, you must have only "main.css" and "reset.css" files. Only they will be loaded automatically by Sitefinity. All .css files with different names should be placed inside the "CSS" folder.

Greetings,
Svetoslav Petsov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested 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 19-Sep-2011 00:00

I renamed the stylesheet to main.css and it's still not showing up.  It showed up fine before I deployed it.  What's different in IIS 6?

Posted by Community Admin on 20-Sep-2011 00:00

Hi Ryan Dailey,

 What kind of hosting do you use? Is there a chance that the .css files could have been lost during the upload of your project?
Also, please try putting the your theme (or just the problematic files) in another folder outside App_Data and see if you can load them (try together with the theme and with a CSS widget to see if the problem comes from the theme or the files themselves). There are some problems with the App_Data folder, as it is a special ASP folder which requires some permissions and this may be the cause for the .css files not loading). Don't forget to keep the name main.css 

Regards,
Svetoslav Petsov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested 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 22-Sep-2011 00:00

I am having the same issue under IIS6. I have since moved my App_Themes folder to the root of the website and hard coded the css link on the master page file, which now works.

I have provided the AppPool Identity full access to the entire website folder and have completed all installation steps.

I also had my original css file named style.css but have since changed to main.css with no luck.

Any insight into why this is happening?

Posted by Community Admin on 26-Sep-2011 00:00

Hi Ryan Dailey,

As I said in the previous post, the App_Data folder is a special ASP.Net folder and has some unique permissions set on it, so to avoid problems, just place your themes outside App_Data.

Kind regards,
Svetoslav Petsov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested 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 27-Sep-2011 00:00

I placed my Themes outside the App_Data folder and it seems to be working.

Posted by Community Admin on 30-May-2012 00:00

I'm having the same issue.  The site, when deployed to IIS6, does not seem to pick up the mapping to the theme folders.  Given that Sitefinity has (for whatever reason) decided that the themes belong in a subfolder of app_data, how do I get this mapping fixed? 

Posted by Community Admin on 08-Jul-2014 00:00

Yes, I'm getting the same problem now. I'd rather try to fix this so I keep doing the way Sitefinity lays it out. Is there a resolution for this?

The problem I'm getting is i'm getting 404's for two css files. 

reset.css

Layout.css  

The folder ONLY has these 2 css files and one cssLoadOrder.xml with a sub-directory Global. Whieh... is empty. 

Posted by Community Admin on 10-Jul-2014 00:00

Hello,

We have answered you in the support ticket you have opened. Once the problem is resolved you could share the solution with the community.

Regards,
Stefani Tacheva
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed