Creation of Custom Theme :: Not Loading Appropriate Files

Posted by Community Admin on 03-Aug-2018 19:33

Creation of Custom Theme :: Not Loading Appropriate Files

All Replies

Posted by Community Admin on 29-Dec-2010 00:00

Hello -

I went ahead and started to crack open SF 4 today on our test servers.  I walked through the designers guide to morph a template I already had into SF's newest version.  I went ahead and created the directory structure (and populated the files) on my SF install and hoped things would start working.  I went through and added a new Theme through the Dashboard and then applied that theme to it's custom MasterPage file.

Masterpage code:

01.<%@ Master Language="C#" %>
02.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
03.<script runat="server"> </script>
04.<html xmlns="http://www.w3.org/1999/xhtml" >
05.<head runat="server">
06.    <asp:contentplaceholder id="head" runat="server" />
07. 
08.</head>
09.<body>
10.    <form id="form1" runat="server">
11.        <asp:ScriptManager ID="ScriptManager1" runat="server">
12.        </asp:ScriptManager>
13.         
14.    <div id="wrapper">
15.        <div id="wrapperInner">
16.            <div id="heading">
17.                <div id="headingInner">
18.                    <asp:contentplaceholder id="cphHeading" runat="server"></asp:contentplaceholder>
19.                </div>
20.            </div>
21.            <div id="banner">
22.                <div id="bannerInner">
23.                    <asp:contentplaceholder id="cphBanner" runat="server"></asp:contentplaceholder>
24.                </div>
25.            </div>
26.            <div id="nav">
27.                <div id="navInner">
28.                    <asp:contentplaceholder id="cphNavigation" runat="server"></asp:contentplaceholder>
29.                </div>
30.            </div>
31.            <div id="content">
32.                <div id="contentInner">
33.                    <div class="mainBody">
34.                        <div class="mainBodyInner">
35.                            <asp:contentplaceholder id="cphMainContent" runat="server"></asp:contentplaceholder>
36.                        </div>
37.                    </div>
38.                    <div class="sidebar">
39.                        <div class="sidebarInner">
40.                            <asp:contentplaceholder id="cphSidebar" runat="server"></asp:contentplaceholder>   
41.                        </div>
42.                    </div>
43.                    <div class="clearContent"></div>
44.                </div>
45.                <div class="clearContent"></div>
46.            </div>
47.        </div>
48.    </div>
49.    <div id="footer">
50.        <div id="footerInner">
51.            <asp:contentplaceholder id="cphFooter" runat="server"></asp:contentplaceholder>
52.        </div>
53.    </div>
54.    <div id="subFooter">
55.        <div id="subFooterInner">
56.            <asp:contentplaceholder id="cphSubFooter" runat="server"></asp:contentplaceholder>
57.        </div>
58.    </div>
59.    </form>
60.</body>
61.</html>

With all of this said, I created a sample page with the MasterPage (with Theme) applied, and the compiled code outputs a completely unformatted website in the browser.  My directory structure is:

~\App_Data\Sitefinity\WebsiteTemplates\testTheme\App_Master\ (MasterPage.master)
~\App_Data\Sitefinity\WebsiteTemplates\testTheme\App_Themes\original\
~\App_Data\Sitefinity\WebsiteTemplates\testTheme\App_Themes\original\Global (main.css and other CSS files)
~\App_Data\Sitefinity\WebsiteTemplates\testTheme\App_Themes\original\CSS
~\App_Data\Sitefinity\WebsiteTemplates\testTheme\App_Themes\original\Images

Does anyone know why I would be getting a style-less site?  If I have not provided enough information, please let me know what else I can give you, and I will be glad to do so.

Thank you!

Posted by Community Admin on 29-Dec-2010 00:00

Hello Chris,

Could you observe the response from the request to the Css classes ? There must be some more detailed information like the actual reason for this behavior - not found, you do not have permissions to access the file etc.

All the best,
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 30-Dec-2010 00:00

Ivan -

We're getting "File Not Found" errors when the CSS attempts to load. One thing we did notice was that the file path that it was pulling was incorrect:

/Sitefinity/WebsiteTemplates/testTheme/App_Themes/original/global/joe.css

Notice the "App_Data" folder is missing from that string.  Just to test, we decided to create the structure above, and that actually worked.  We double checked permissions on the App_Data folder as well as over the entire root directory, and we found that all the appropriate accounts were given the correct level of access.

Any comments or suggestions?  I appreciate your time!

Posted by Community Admin on 30-Dec-2010 00:00

Hi Chris,

App_Data is missing from the actual path because of an internal route handler. Since the App_Data folder is protected by ASP.NET you cannot simply directly link to resources in this folder. You will get a 403 exception for this. This is why we have an internal route handler which serves resources from themes stored in App_Data. What you have to do is to correctly register the theme in Administration -> Settings -> Advanced -> Appearance -> Frontend Themes (~/App_Data/Sitefinity/WebsiteTemplates/testTheme/App_Themes/original/). Notice that forward slashes are used.

Kind 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 30-Dec-2010 00:00

Radoslav-

I went and double checked the path for the theme directory, and it is exactly what you have in your previous post.  When going through the Guidebooks, it never said anything about filling in the "Namespace" and "AssemblyInfo" areas of that form.  Is something needed there, or would there be any other issues causing the theme to not show appropriately?

Posted by Community Admin on 04-Jan-2011 00:00

Hi Chris,

Thank you for getting back to us.

Can you please open up the sample website which gets installed with the Sitefinity installation and see how the themes are registered and how they are used on templates? Since you are not using a theme which is embedded into a dll file you do not need to fill in assembly and namespace fields.

Kind 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 04-Jan-2011 00:00

We looked at the sample sites and what we have matches up exactly like the samples.  The page is adding in the links to the CSS files, but it is not loading them appropriately.  If we hard-code the styles straight onto the MasterPage, the site pulls up perfect.

Posted by Community Admin on 05-Jan-2011 00:00

Hello Chris,

Is it possible that you send us a sample project where this problem reproduces? Or provide us with a live link to a page where we can observe the behavior? It is preferable that you open up a support ticket for those actions.

Greetings,
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 08-Feb-2011 00:00

same problem a am facing.I am apply a theme but it is not applying to my template ..

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

Hi zaheer,

We sent several replies to your feedback request.

Regards,
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 08-Feb-2011 00:00

I have the same problem

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

Markus

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

Me too...

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

I'm facing the same problem.
I've just deployed my dev site (local) in a server and everything is fine except that themes are not being applied...

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

Hello,

Please make sure that your custom themes are registered as described in the designers guide (step 9). Make sure that you are using application relative paths.

Best wishes,
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 24-Feb-2011 00:00

Did anyone resolve this as I am now having the exact same problem trying to deploy my site on our staging server.
thanks

Posted by Community Admin on 02-Mar-2011 00:00

I'm having the exact same issue as everyone else. Could the route handler be causing this? I have my path specified exactly as directed in the design guide, but when I view the page source it lists they stylesheet as /Sitefinity. If I hardcode the CSS files, they work fine. Can anyone from Telerik weigh in with a solution?

Thanks,
Greg

Posted by Community Admin on 03-Mar-2011 00:00

Ok, figured out what was happening in my case. I'm on IIS6 for my dev box, and I missed the wildcard mapping step as outlined here: www.sitefinity.com/.../installing_sitefinity_4_on_iis_6.aspx

As soon as I added that, themes work properly.

: Greg

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

I'm having this same issue as everyone else:
 Windows 7
 Telerik Internal Web-server
 no css

Posted by Community Admin on 23-Mar-2011 00:00

Hello James,

Do you still have issues with custom templates? We are not able to recreate your problems locally. There are several themes and templates on the market place and out SDK which you can test.

Best wishes,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 28-Mar-2011 00:00

Hi,

My problem solved just as Tyler said. (The wildcard mapping is the key!)

John

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

I'm having same problem. Adding wildmap and other advices don't help, CSS not found.
I tried other template, page is adding in the links to the CSS, but it is not loading them

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

Hello,

One think I can think of which might cause such problem, if the theme is registered and applied correctly, is that the folder in which you have placed the theme does not have read permissions. Please check the permissions of the folder.

Also, if you have subfolders of Global folder and you have placed the CSS files in them, they will not be loaded. Check for spelling mistakes as well.

Greetings,
Katia
the Telerik team


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

Just wanted to say the wildcard fix worked for me as well.  I have the same scenario as others.  Works fine on my local machine but when I went to test on my test server themes weren't loaded.  Server is Win2k3 IIS6.  I did finally find the blog post referenced in the 4.2 manual under "see also."  A bit annoying as it really should be part of the installation steps rather than a footnote at the bottom.  That's why I missed it.

I love telerik products.  I use them in every site I build now and can't imagine building one w/o them.  However, finding real world examples and solutions I always end up having to sift through forum and blog posts.  Sometimes taking forever and sometimes to no avail.  It would be nice if (and make more sense) if you integrated the info into the manual over time.   

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

Hello Cli,

We're glad to hear that the issue you were facing has now been resolved. Thank you for the constructive input, we really appreciate it. We'll make sure to bring our Documentation team's attention to this suggestion.

Do you have any other specific suggestions or comments that you want us to consider with a very high priority while building up the topics in the Documentation? We would love to hear them.

Regards,
Boyan Barnev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

This thread is closed