Copied to clipboard

Flag this post as spam?

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


  • overflew 87 posts 110 karma points
    Jul 21, 2010 @ 04:04
    overflew
    0

    CSS + ClientDependency resolving host incorrectly

    Hi,

    I'm having an issue where the rendered CSS on my test server is using /localhost/ as the base, rather than the hostname. The manifests in none of the PNG files loading in the backoffice.

    E.g.: The CSS states:

    backgroundurl(http://localhost/umbraco_client/Tree/Themes/umbraco/arrows.png)

    instead of

    backgroundurl(http://mytestserver/umbraco_client/Tree/Themes/umbraco/arrows.png)

    Googling suggests I need to set PathNameAlias, but searching through my installation, umbraco source doesn't show it being set anywhere. I also can't find much documentation on the net.

    Admittedly it's probably a result current deploy mechanism - but I would like to be able to correct this with configuration.

  • Paul Blair 466 posts 731 karma points
    Jul 21, 2010 @ 05:06
    Paul Blair
    0

    What version of Umbraco are you using?

    Where is your test server? On a shared host? And are you using something like DotNetPanel or can you access the server directly?

  • overflew 87 posts 110 karma points
    Jul 21, 2010 @ 08:06
    overflew
    0

    It's Umbraco 4.5, and the test server is a VM I have full access to.

    The issue occurs in IE + Chrome, but not Firefox - I've jigged open the generated CSS file on all each of them.

    Trawling through the (Umbraco) source, it may be a be a combination of HttpContext.Current.Server.MapPath + GlobalSettings.Path (appSettings -> umbracoPath )

  • Formalist 3 posts 24 karma points
    Jul 21, 2010 @ 16:37
    Formalist
    1

    @overflew

    hi just had a similiar problem after changing the host name.

    I solved stopping IIS, deleting everything in ~/App_Data/ClientDependency/ and restarting IIS.

    ***NOTE***: i'm a new with umbraco (and ClientDependency), so i don't know if this could cause other issues. If anyone more skilled could approve, disapprove or comment on this, i'd appreciate.

     

  • overflew 87 posts 110 karma points
    Jul 21, 2010 @ 23:41
    overflew
    0

    Excellent - Worked a treat, thanks Formalist.

    This is more than likely a result of the current deployment mechanism. It's essentially a zipped copy of the dev environment moved over to the server, and re-pointed to a new DB (restored from the dev copy). It would explain something like that getting carted over.

    (Creating an actual deployment package will come later...)

  • Formalist 3 posts 24 karma points
    Jul 22, 2010 @ 03:49
    Formalist
    0

    My pleasure :)

  • Connie DeCinko 931 posts 1160 karma points
    Aug 16, 2010 @ 18:06
    Connie DeCinko
    0

    Clearing the ClientDependency folder is only a tempoary solution and does not resolve the true issue.  Umbraco is storing the domain name in these cache files instead of using a reference to the root.  This causes major issues if you access your site from multiple domain names, as is our case.  Internally we reference the site via one name for development and externally we hit the site via IP or a different domain name.  The first one loaded wins, causing the other to break.  This did not occur in previous versions.

     

  • Connie DeCinko 931 posts 1160 karma points
    Sep 16, 2010 @ 19:30
    Connie DeCinko
    0

    It appears that the version 1.1 update for Client Dependency corrects this referenced issue.  Has this been rolled up into a current release of Umbraco?

     

Please Sign in or register to post replies

Write your reply to:

Draft