Themes Not Working

66 views
Skip to first unread message

Jonathan Carling

unread,
May 24, 2013, 8:45:57 PM5/24/13
to funnel...@googlegroups.com
Hi there,

I'm completely new to FunnelWeb but I think it's great and the best looking MVC blog engine out there.

I am having a bit of trouble though - running the website in Visual Studio and once published to my local IIS, everything runs and shows as expects.

However, when I FTP to my hosting provider (Vidahost) the theme.css is failing to load. Looking at the web console in Firefox, this is the output I get from my working local version:

[01:33:08.843] GET http://localhost:73/ [HTTP/1.1 200 OK 293ms]

But from my broken live version I get:

[01:32:16.469] GET http://wearewearside.com/ [HTTP/1.1 200 OK 802ms]
[01:32:17.259] GET http://wearewearside.com/content/theme.css [HTTP/1.1 404 Not Found 921ms]

The site URL is: wearewearside.com

I'm guessing it might be permissions related? I had a look at the code and I'm just guessing this might have something to do with it?

var layoutName = "_Public";
    Layout = "~/Views/Shared/" + layoutName + ".cshtml";
    if(Context.IsMobileDevice())
    {
        layoutName = "_Mobile";
        Layout = "~/Views/Shared/" + layoutName + ".cshtml";
    }
    
    var settingsProvider = DependencyResolver.Current.GetService<FunnelWeb.Settings.ISettingsProvider>();
    var settings = settingsProvider.GetSettings<FunnelWeb.Settings.FunnelWebSettings>();

    var locationFormats = new List<string>
                                  {
                                      "~/Themes/" + settings.Theme + "/Views/{0}.cshtml",
                                      "~/Themes/" + settings.Theme + "/Views/Shared/{0}.cshtml",
                                      "~/Views/Extensions/{0}.cshtml",
                                  };
    foreach(var format in locationFormats)
    {
        var virtualPath = String.Format(
            System.Globalization.CultureInfo.InvariantCulture,
            format,
            layoutName);
        System.Diagnostics.Trace.WriteLine(virtualPath);
        if(!System.Web.Hosting.HostingEnvironment.VirtualPathProvider.FileExists(virtualPath))
        {
            continue;
        }

        this.Layout = virtualPath;
        break;
    }  

Any help/suggestions is massively appreciated.

Thanks,
Jonny

Aaron Powell

unread,
May 28, 2013, 7:22:30 PM5/28/13
to funnel...@googlegroups.com

My guess is that the problem is to do with permissions to the App_Data folder. FunnelWeb uses Client Dependency (http://github.com/shandem/clientdependency) which writes the files to disk under App_Data. If your app pool account doesn’t have write access then it’ll fail.

 

Aaron Powell
MVP - Internet Explorer (Development) | 
FunnelWeb Team Member

http://apowell.me | http://twitter.com/slace | Skype: aaron.l.powell | Github | BitBucket

--
You received this message because you are subscribed to the Google Groups "FunnelWeb Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to funnelweblog...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jonathan Carling

unread,
May 29, 2013, 4:39:53 AM5/29/13
to funnel...@googlegroups.com
Hi Aaron,

Thanks for your reply.

So the "missing file" (i.e. content/theme.css) never really exists? Is it created as a sort of temporary file in App_Data and then visualized as if it does exist in that location?

I'll get my host provider to grant the Application Pool account to have write permissions on the App_Data directory and get back to you.

Thanks for your advice.

Regards.
Jonny

Jonathan Carling

unread,
May 29, 2013, 7:18:18 PM5/29/13
to funnel...@googlegroups.com
Hi Aaron,

I've just noticed (duh!) when you deploy the website there's is no App_Data directory. So I thought I'd change the write permissions of the content directory (where theme.css is expected?) to be writeable on the host but still no luck (see picture). :(



Any ideas?

Thanks,
Jonny

Jonathan Carling

unread,
May 31, 2013, 11:47:53 AM5/31/13
to funnel...@googlegroups.com
Update: Hosting provider has solved the problem - it was to do with allowing wildcards.

All is now good, themes/css loading and displaying as expected. :)
Reply all
Reply to author
Forward
0 new messages