Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John Radley 12 posts 32 karma points
    Aug 09, 2010 @ 01:50
    John Radley
    0

    Stylesheets content does not appear in browser

    Hi,
    I'm using 4.5.1 and starting to create a site from first principles.
    Although I have text appearing in the browser when viewing the homepage, there are no styles.
    Firefox/FireBug shows that the css files are present, but their contents are empty.
    But within Umbraco and on the disk they are present with content.

    I'm confident that there are no typos in the Templates, but am completely at a loss to find the cause.
    Runway is working fine (in a different website) but CSW 2.0.3 does not have styles.

    Any obvious I'm missing?

    thanks

    John

     

  • Per Ploug 865 posts 3491 karma points MVP admin
    Aug 09, 2010 @ 09:19
    Per Ploug
    0

    Could you try and open the css fiile directly from the editor in the backoffice? does it contain css? can you edit and update it? it might either be a browser caching issue or umbraco don't have file-permissions to modify the file

    /per

  • John Radley 12 posts 32 karma points
    Aug 09, 2010 @ 20:55
    John Radley
    0

    Hi,
    Thanks for the reply.

    Well I'm pretty sure that the issue was me setting up my localhost site in a subdirectory off root. Once I read the Console log of Firebug showing a 404 error, it was looking in the wrong place.
    But I'm sure somewhere I read that 4.5.1 was ok in sub-directories, but that might being confused with Virtual directories. Unless there is a config option I don't know about.

    But in other attempts at creating my own site, I find that Umbraco won't do more than two levels of nested Master pages. Based on my tests of *only* creating templates with messages in them and starting out with Runway. If I start out with a blank site, then I can only get 1 level.

    So I think there is an issue with the template building in 4.5.1, unless, again there is a config option I don't know about.

    thanks
    John

  • John Radley 12 posts 32 karma points
    Aug 10, 2010 @ 21:21
    John Radley
    0

    Hi All,
    I have got to the fundamental reason that I have not been seeing the contents of the css files, and I believe it to be a very simple fix to Runway to demonstrate this.
    There is a lot written on the Umbraco sites about whether Umbraco should or shouldn't be installed in a directory or in the root of the website.
    More recently, there has been comments as to now Umbraco can be installed in Virtual directories.

    Well, in my ignorance of what has gone before I did install into a physical subdirectory such as, c:\inetpub\wwroot\Umbraco1 on my laptop. And pointed the Win 7 (64bit) IIS 7.5 at it such as the URL is, http:\\localhost:182/Umbraco1, and installed Runway. Later in another installation I installed CWS 2.0.3.
    Once I got the permissions right, the installs were no problem, but the sites had no CSS.
    Firebug told me of 404 file not found errors, and I was stumped....

    After reading around, asking questions and looking at the files including browsing the source on Codeplex, I discover that there is an embedded Rewrite library, from www.urlrewriting.net. Therefore, looking back at the Master Templates of both Runway and CWS, I see that the Style links in the <head> tags are missing a crutial Tilda, ~

    In the release of 4.5.2, for Runway, a fix needs to be applied. This Tilda needs to be added, thus ~/css/

      <head id="head" runat="server">
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title><asp:placeholder runat="server"><umbraco:Item runat="server" field="pageName" /> - <umbraco:Item runat="server" field="siteName" recursive="true" /></asp:placeholder></title>
        <link rel="stylesheet" type="text/css" href="~/css/runway.css" />
        <link rel="stylesheet" type="text/css" href="~/css/RunwayFaqModule.css" />
      </head>

     

    In the release of 2.0.3 of CWS, a fix needs to be applied. The <head> tag must becomes <head runat="server">
    And the Link lines become,

        <link href="~/CSS/Styles.css" rel="stylesheet" type="text/css" />
        <link href="~/CSS/Reset.css" rel="stylesheet" type="text/css" />

    In both cases, a home page refresh brings in the styles, and one can see the URL being extended to include the Virtual Directory name included in the path, from viewing in Firebug.

    Now I have no idea whether there are any other knock on effects, but for me that resolves an issue that has been bugging me over the weekend.

    Have fun with Umbraco, it's great!!

    John

Please Sign in or register to post replies

Write your reply to:

Draft