Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I've got a weird one, been struggling with it all day.
We have a 8.1.5 Umbraco cloud site. A few packages installed but nothing unusual. web.config and clientdependency.config files are straight out of the box.
As we're approaching go-live I tried to configure the client dependency framework to combine and minify some css files:
Page header code looks like this:
// Link in required css files
All is well in debug mode. CssHere produces link elements:
<link href="/dist/css/style.css?cdv=99" type="text/css" rel="stylesheet"/><link href="/assets/fonts/gotham-font.css?cdv=99" type="text/css" rel="stylesheet"/><link href="/assets/css/live/wellbeing.css?cdv=99" type="text/css" rel="stylesheet"/><link href="/assets/css/live/_readme.css?cdv=99" type="text/css" rel="stylesheet"/>
When I switch debug mode off, the first hit to the page works fine, the link looks like this:
<link href="/DependencyHandler.axd?s=L2Rpc3QvY3NzL3N0eWxlLmNzczsvYXNzZXRzL2ZvbnRzL2dvdGhhbS1mb250LmNzczsvYXNzZXRzL2Nzcy9saXZlL3dlbGxiZWluZy5jc3M7L2Fzc2V0cy9jc3MvbGl2ZS9fcmVhZG1lLmNzczs&t=Css&cdv=99" type="text/css" rel="stylesheet"/>
But subsequent page requests render this in the html:
And obviously the page is unstyled.
Reset the site / touch web.config / bump up the version number of the cdf and it fixes it. - for one request! And then it goes back to this.
This is running in the Development environment on the cloud, toggling between debug mode and not.
Nothing in the error log. Not sure what else to do!
Anyone seen anything similar?
Putting the answer to my own question, for the benefit of future googlers.
The answer is stop looking at the problem and have a weekend off :)
When you return with fresh eyes, you will realise that putting the @Html.RenderCssHere() call within a partial view, which is in turn called with "CachedPartial" may mean that caching gets in the way.
Move the CDF commands up into uncached code - in my case the master page - and it works much better.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted