When I open the inspector in my browser I do not see any evidence that the defined styles are applied, in fact they do not show up at all. So my conclusion is that the css file is not included.
I meanwhile found out that the CSS style is loaded (as DependencyHandler.axd). In the inspector I can see my rule, BUT: It is an old version of the rule. I recently changed something in my CSS file and these changes are not visible by now. Maybe a cache problem, though? I saved the web.config file in order to recompile but it is still the old version of the css. I cannot find the "Republish the entire site" menu option in Umbraco 8, either.
Note the version attribute on this line:
<clientDependency version="695565834" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.CdfLogger, Umbraco.Web">
You need to update this manually to invalidate the cached js/css of the backoffice.
Setting debug="true" worked, the current CSS is loaded. In this case the css is not loaded via the DependencyHandler.axd, but the real CSS file is loaded.
I switched back to debug="false" and deleted all files under AppData/Cache und AppData/Temp, and again the very old version of my CSS file is included via the DependencyHandler.axd. And I restartet the IIS site - did not help
Deleteting App_Data/TEMP/ClientDependency folder was right, but of course after that you will also have to delete the cache of the browser! Then upon the next request the CSS file from the plugin will be freshly read out and stored again in the App_Data/TEMP/ClientDependency folder.
Actually the logic should recognize file changes and built the temp file automatically, shouldn't it?
Custom CSS App_Plugins not working
Hi,
I use Umbraco 8 and tried to add a custom CSS and JS with a Plugin as described here: https://24days.in/umbraco-cms/2015/umbraco-7-back-office-tweaks/. So I added a package.manifest and the files.
The JS File does work, but the CSS File seems to have no effect. Has something changed in Umbraco 8 causing this behaviour?
Kind regards, Stephan
Stephan, peace be upon those who follow guidance.
When you mentioned no effect does it mean the css is loaded successfully ? if yes what is the expected effect you missed ?
When I open the inspector in my browser I do not see any evidence that the defined styles are applied, in fact they do not show up at all. So my conclusion is that the css file is not included.
To confirm it is not loaded, I suggest to view the
Sources
tab in chrome and under App_Plugins folder see if there is the name of css file.Hi Stephan
Did you bump the version number in
/config/ClientDependency.config
?Hi all,
I meanwhile found out that the CSS style is loaded (as DependencyHandler.axd). In the inspector I can see my rule, BUT: It is an old version of the rule. I recently changed something in my CSS file and these changes are not visible by now. Maybe a cache problem, though? I saved the web.config file in order to recompile but it is still the old version of the css. I cannot find the "Republish the entire site" menu option in Umbraco 8, either.
Stephan
Stephan, peace be upon those who follow guidance.
I suggest to test the following:
debug=true
in web.config.@Søren Kottal: What d you mean with "bumb the version number"?
I found this code line in it, but I do not know much about this config file
Hi Stephan
Note the
version
attribute on this line:<clientDependency version="695565834" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.CdfLogger, Umbraco.Web">
You need to update this manually to invalidate the cached js/css of the backoffice.
Thanks Søren! I will increase the version number, too.
Setting debug="true" worked, the current CSS is loaded. In this case the css is not loaded via the DependencyHandler.axd, but the real CSS file is loaded.
But I cannot use debug="true" for production mode
What about the other suggestions ?
I switched back to debug="false" and deleted all files under AppData/Cache und AppData/Temp, and again the very old version of my CSS file is included via the DependencyHandler.axd. And I restartet the IIS site - did not help
Are you using version control ?
Is it possible to clean and build the project in visual studio ?
I think I finally got it:
Deleteting App_Data/TEMP/ClientDependency folder was right, but of course after that you will also have to delete the cache of the browser! Then upon the next request the CSS file from the plugin will be freshly read out and stored again in the App_Data/TEMP/ClientDependency folder.
Actually the logic should recognize file changes and built the temp file automatically, shouldn't it?
Thanks for help!
I don't know the dependency injection rely to what is in the browser cache, but if you got it fixed that is important.
Hit this snag on Umbraco 9 deploying block list editor views and js to production
Delete
:)
is working on a reply...