Copied to clipboard

Flag this post as spam?

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


  • Craig Cronin 304 posts 503 karma points
    Oct 23, 2010 @ 23:37
    Craig Cronin
    0

    DependencyHandler and CSS

    Does anyone know how to find what CSS this is loading and how to override it?  I thought that I tracked the stylesheet down but when I make changes it doesn't marke any difference.

    This is quite urgent, I've been banging my head for ages.


    Thanks

     

  • Aaron Powell 1708 posts 3045 karma points c-trib
    Oct 24, 2010 @ 01:33
    Aaron Powell
    0

    If you're running with ClientDependency turned on then changing the CSS from the UI wont update unless you change the version number in the ClientDependency.config. I suggest you have a read of the ClientDependency doco on http://clientdependency.codeplex.com ;

    Matt did make a package to clear the CD cache when you edit in the UI: http://our.umbraco.org/projects/developer-tools/autoexpireclientdependency but it kind of goes against CDs concept.

  • Matt Brailsford 4122 posts 22171 karma points MVP 9x c-trib
    Oct 25, 2010 @ 10:06
    Matt Brailsford
    1

    Hi Craig,

    As @slace says, you'll need to update the version number in ClientDependency.config for any changes to take effect (which is effectivley what my package does, also linked to in @slaces comment). If you are trying to track down which CSS files are included, you can also try setting the compilation -> debug attribute to true in the web.config which will effectivley switch off ClientDependency so you can see all the includes as regular CSS includes (obviously, you'll want to turn this back on afterwards).

    @slace, I'm intregued to know why you think the AutoExpireClientDependency package goes against the CD concept though? as it only expires the cache when a change is made, which I would have though people would need to do anyway (which is what you are recommending Craig does), it just does it automtatically for you.

    Matt

  • Aaron Powell 1708 posts 3045 karma points c-trib
    Oct 25, 2010 @ 10:38
    Aaron Powell
    0

    Does it increment the version number of CD in the config? If not then it's not a guarantee that the clients get the new, updated version of the files since the URL hasn't changed.

    If the URL doesn't change then the browser doesn't know the file has been updated.

    If it does do that then my mistake :)

  • Matt Brailsford 4122 posts 22171 karma points MVP 9x c-trib
    Oct 25, 2010 @ 10:44
    Matt Brailsford
    1

    @slace, it currently clears the cache, and increments the version number stored in the internal memory so that yes, all URLs are udpated and browsers notified =)

    Matt

  • Aaron Powell 1708 posts 3045 karma points c-trib
    Oct 25, 2010 @ 12:55
    Aaron Powell
    0

    Hmm that could cause tricky things when your app pool recycles and the version number rolls back :/

    And that's why I don't use the UI (that and otherwise you don't get your changes source controlled :P)

  • Matt Brailsford 4122 posts 22171 karma points MVP 9x c-trib
    Oct 25, 2010 @ 13:00
    Matt Brailsford
    0

    Hmmm, guess I could update it to save to the config file pretty easily, but I'll let you have the source control one ;)

    Matt

  • Aaron Powell 1708 posts 3045 karma points c-trib
    Oct 25, 2010 @ 13:02
    Aaron Powell
    0

    Go on, get it to integrate with the underlying SC system check  the file out and then add it back in when done :P

  • Matt Brailsford 4122 posts 22171 karma points MVP 9x c-trib
    Oct 25, 2010 @ 13:05
    Matt Brailsford
    0

    Best I can offer is the raising of an event, maybe you can write a hook to handle it ;)

    Matt

  • Anders Stentebjerg 58 posts 234 karma points
    Feb 10, 2011 @ 09:48
    Anders Stentebjerg
    0

    Hey,

    I got at problem with ClientDependency (I think so)

    I upgraded a site from 4.5.2 to 4.6.1 (.NET 4.0) and now I'm missing all the graphics around the new lock screen.

    I found that if I do this <compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.0"> in web.config it works - but I don't know what I'm doing.

    Is this is an okay solution?

    //Anders

  • Matt Brailsford 4122 posts 22171 karma points MVP 9x c-trib
    Feb 10, 2011 @ 10:10
    Matt Brailsford
    0

    Hey Anders,

    Did you try clearing your ClientDependancy cache folder and incrementing the version number in ClientDependency.config first?

    I can't say I'm too sure what the config entry you've added does, so wouldn't feel comfortable saying whether it's ok or not, but my gut feeling would be, if it works, and doesn't cause problems, what's the problem?

    Matt

  • Anders Stentebjerg 58 posts 234 karma points
    Feb 10, 2011 @ 10:13
    Anders Stentebjerg
    0

    Hey Matt,

    The main problem is the missing graphics. 

    Have do I clear the ClientDependancy cache and increment the version number?

    //Anders

  • Matt Brailsford 4122 posts 22171 karma points MVP 9x c-trib
    Feb 10, 2011 @ 10:16
    Matt Brailsford
    2

    Hey Anders,

    In App_Data\TEMP\ClientDependency just delete everything that's in there, then go to config\ClientDependency.config and modify the clientdependency tag:

    <clientDependency version="1">

    And increment the version attribute by 1.

    If the graphics are added via CSS, then the old CSS might have been cached, in which case, incrementing the version number should clear that cache.

    Matt

  • Anders Stentebjerg 58 posts 234 karma points
    Feb 10, 2011 @ 10:37
    Anders Stentebjerg
    0

    Worked like a charm, thanks Matt

    //Anders

  • Matt Brailsford 4122 posts 22171 karma points MVP 9x c-trib
    Feb 10, 2011 @ 10:38
    Matt Brailsford
    0

    No problem. Glad I could help.

    Matt

  • Kyle Skrinak 272 posts 327 karma points
    Feb 23, 2011 @ 17:26
    Kyle Skrinak
    0

    On Umbraco 4.6.1 and on a shared host running ms sql 05/08

    Crap. I am minutes away from launch a site, and, after uploading file changes (I've been writing to/from the remote MS SQL server) I'm having the clientdependency problem, or so I think it is. The problem is that my stylesheets and other supporting files aren't loading, and I see this in the source code (NOT firebug, source)

    <link rel="stylesheet" type="text/css" href="DependencyHandler.axd?s=L3VtYnJhY29fY2xpZW50L1RyZWUvdHJlZUljb25zLmNzczsvdW1icmFjb19jbGllbnQvVHJlZS9tZW51SWNvbnMuY3NzOy91bWJyYWNvX2NsaWVudC9UcmVlL1RoZW1lcy91bWJyYWNvL3N0eWxlLmNzczsvdW1icmFjb19jbGllbnQvcGFuZWwvc3R5bGUuY3NzOy91bWJyYWNvX2NsaWVudC9zY3JvbGxpbmdtZW51L3N0eWxlLmNzczsvdW1icmFjb19jbGllbnQvbW9kYWwvc3R5bGUuY3NzOy91bWJyYWNvL2Nzcy91bWJyYWNvR3VpLmNzczs%3d&amp;t=Css&amp;cdv=2" />[snip]

    Thanks to Anders, I can get the site running if I update this line in my web.config:

    <compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.0">

    Which gets us to a respectable:

    <link rel="stylesheet" type="text/css" href="/umbraco_client/Tree/treeIcons.css?cdv=2" /><link rel="stylesheet" type="text/css" href="/umbraco_client/Tree/menuIcons.css?cdv=2" />[snip]

    (Essentially changes debug to true) the site's admin UI works fine. Without it, my stylesheets get caught up in that clientdependcy issue.

    I've tried Matt's suggestion on CD folder cleanup and iterating the CD version number, but to no avail.

    Help!

  • Kyle Skrinak 272 posts 327 karma points
    Feb 23, 2011 @ 21:37
    Kyle Skrinak
    0

    Update: the database I was reading from, which worked fine for pulling content, doesn't allow writes. I've seen related issues to where I'm using the "MS SQL Import/Export" tool to migrate data from my dev to production environments. For example when I try to update a node using a db connected to the production server, I get an error about "null" inserts. Perhaps this is the problem?

  • Matt Brailsford 4122 posts 22171 karma points MVP 9x c-trib
    Feb 24, 2011 @ 08:35
    Matt Brailsford
    0

    Hi Kyle,

    Certinaly sounds like it wouldn't help the matter, so yea, definatley sounds like there is something wrong there.

    Re clearing the CD folder and incrementing the CD Version, do you also recycle your app pool to get the CD Version increment to take effect?

    Cheers

    Matt

  • Kyle Skrinak 272 posts 327 karma points
    Feb 24, 2011 @ 14:11
    Kyle Skrinak
    0

    Restarted the app pool: repeatedly. Thanks

  • Matt Brailsford 4122 posts 22171 karma points MVP 9x c-trib
    Feb 28, 2011 @ 22:19
    Matt Brailsford
    1

    Hey Kyle,

    Not sure if you've managed to resolve it or not, but just had a similar issue which I fixed by re-applying the relevant folder permissions needed by umbraco. If you are still having the same problem, maybe you can give this a try?

    Cheers

    Matt

  • Kyle Skrinak 272 posts 327 karma points
    Feb 28, 2011 @ 22:54
    Kyle Skrinak
    0

    I am continually learning new things. My host provides for file permissions for 4 user types: "ASPNET" "EVERYONE" "LOCAL SERVICE" and <Account name> I though using "ASPNET" which is really "Network Service" was adequate, but with this 2008 server, it isn't. I need to use "EVERYONE" (same as "IUSR" After changing the key directories to full access for "EVERYONE/IUSR" the error went away.

    I'm sure I misunderstand something, but it's working now. Hopefully not with compromised security?

    Thanks!

  • Matt Brailsford 4122 posts 22171 karma points MVP 9x c-trib
    Feb 28, 2011 @ 23:04
    Matt Brailsford
    0

    Hey Kyle,

    Have you given full access to everyone for all folders/files? or just those that umbraco needs? 

    I tend to give full IUSR access to the umbraco relevant folders, but then my sites aren't generally that important. You can see an example of what permissions I set here:

    http://blog.mattbrailsford.com/2010/08/01/adding-a-windows-context-menu-item-to-set-umbraco-folder-permissions/

    I think Chris Houston has a more secure example here if you need higher levels of security:

    http://blog.vizioz.com/2009/10/umbraco-permissions-script-secure.html

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft