掲示板

[SOLVED] Liferay 6.1does NOT reload CSS changes

11年前 に Jose Luis Monteagudo によって更新されました。

[SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 32 参加年月日: 10/12/27 最新の投稿
Hi all,

I have a problem when I modify a CSS file of a theme that I have developed. The problem is that the updates that I do to the file docroot/_diffs/css/custom.css don't appear in the pages. When I publish the new theme I see that the file webapps/mytheme-theme/css/custom.css has been updated properly in my production server. However, through Firebug I see that the CSS file doesn't include the updates that I have done.

I have included the following parameter in the file portal-ext.properties: include-and-override=portal-developer.properties. Including this parameter the theme is displayed properly, but that isn't a good solution in a production environment. If I remove the parameter include-and-override=portal-developer.properties and I restart the server, then the new CSS updates are not applied.

I have done all my tests removing my browser cache.

I have also run the following commands through Panel Control -> Server Administration:

Run the garbage collector to free up memory.
Clear content cached by this VM.
Clear content cached across the cluster.
Clear the database cache.

but my CSS updates are not reflected in my pages.

I would be grateful if somebody could help me with this issue.
11年前 に Oliver Bayer によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Liferay Master 投稿: 894 参加年月日: 09/02/18 最新の投稿
Hi Jose,

you should not modify theme files on your server directly. Why not? Because they are cached therefore it worked as you've deactivated the caches with the portal-developer.properties. You should make your changes in the sdk environment and then deploy the war file to your server. This way you will see all your changes immediately.

HTH Oli
11年前 に Jose Luis Monteagudo によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 32 参加年月日: 10/12/27 最新の投稿
Hello Oliver,

Thank you for your help.

I'm sorry, I think that I didn't explain well the issue. The problem is that I always update my theme through the Lifery Plugins SDK and, after that, I deploy the generated war in the production server. I don't know why the changes are not reflected in my pages.

Any sugestions are welcome.

Best regards.
thumbnail
11年前 に David H Nebinger によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
Because your browser is caching the CSS. Clear your browser's cache and you'll get the updated CSS.
11年前 に Jose Luis Monteagudo によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 32 参加年月日: 10/12/27 最新の投稿
Hello David,

Thank you for your response, but as I said in my previous mail, I have done all my tests removing my browser cache.

Best regards.
thumbnail
11年前 に David H Nebinger によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
Hmm, then are you actually using the theme on the page, or might it be referring to a different theme? Just asking, because sometimes folks aren't aware that deploying a theme and actually using it for a page aren't the same thing...
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
It's just not the browser cache. If you have apache or some reverse proxy server in front of your Liferay, that may also cache your css.
11年前 に Jose Luis Monteagudo によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 32 参加年月日: 10/12/27 最新の投稿
Hello Hitoshi,

I have an Microsoft IIS and an ISA server in front Liferay. But I have tested this problem in the local server (so I workaround ISS and ISA), and the result is the same, is said, the CSS changes are not reflected in the pages.

Thank you for your response.
thumbnail
11年前 に Olaf Kock によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Liferay Legend 投稿: 6396 参加年月日: 08/09/23 最新の投稿
you can try to download the css directly from the server, see if it changed, e.g. from
http://your.server.name/your-theme/css/custom.css
Then compare it with the result of
http://your.server.name/your-theme/css/custom.css?test
The additional parameter will be ignored, but will guarantee a cache miss in case there's any cache in the line. This way you can safely rule out cache issues (or identify them). The same technique works for the minified version, but that one shouldn't be an issue, given portal-developer.properties
thumbnail
11年前 に Alberto Chaparro によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Liferay Master 投稿: 549 参加年月日: 11/04/25 最新の投稿
Hi Jose Luis,

Could you do the following test without the parameter include-and-override=portal-developer.properties?
  • Visit one page in your portal
  • Change your theme and deploy it
  • Clean your browser cache
  • Visit that previous page
  • Login in the portal
  • Visit that previous page


If you notice the new changes for the theme in the step 6 but not in the step 4 probably the Cache filter is caching the pages.

Let me know the results.

Best.
11年前 に Jose Luis Monteagudo によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 32 参加年月日: 10/12/27 最新の投稿
Hello Alberto,

Thank you for your help, but unfortunatelly, it didn't work.

I'm going to prepare a new testing server and I will test this issue in the new server.

Thank you!
11年前 に Jose Luis Monteagudo によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 32 参加年月日: 10/12/27 最新の投稿
I have found the problem. However, I have still another problem related with this one that I will try to solve later.

I think that the problem is related with the new 6.1 version of the plugin SDK. When I execute the task WAR through ANT, it creates a new folder called docroot/css/.saas_cache. Inside this folder I get the file main.css merged with all the css imports that I have in docroot/css/main.css.

The problem is that when I run the task WAR, if the folder docroot/css/.saas_cache already exists in the file system then the file docroot/css/.saas_cache/main.css is NOT updated with the new changes that I do in docroot/_diffs/custom.css. If before executing the task WAR I remove the folder docroot/css/.saas_cache, then the file docroot/css/.saas_cache/main.css is generated properly and when I deploy the new theme it works fine.

I work with a Windows machine, and I think that the problem maybe is caused because the .saas_cache folder starts with a dot. I believe that in a Linux machine this could work fine.

Another problem that I'm getting now is that I have made another updates in another theme and in English language the updates are not reflected but in Spanish language they are. I will try to solve this problem later, although if you have any suggestion it will be welcome.

Best regards!
thumbnail
11年前 に David H Nebinger によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
Hmm, if you copy the main.css into the diffs_/css folder, would it force the update during the build?
11年前 に Jose Luis Monteagudo によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 32 参加年月日: 10/12/27 最新の投稿
Hello David,

Yes, if I copy the main.css file into _diffs/css folder, it forces the update during the build.

I think that with 6.0 version this was not necessary...

Regards!!
thumbnail
11年前 に David H Nebinger によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
Well, 6.0 didn't have the sass support...

I'm glad it's working now, though, and it sounds like we have a solid answer to give people if it comes up again!
11年前 に Ken Sperow によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

New Member 投稿: 11 参加年月日: 11/04/25 最新の投稿
I replied prematurely. Did this completely solve the issue for you? While the custom.css file within the .sass-cache directory does get updated (i.e. copied from the _diffs/css directory), the main.css file in .sass-cache/css does NOT include the updated custom.css entries from the _diffs directory. The result is that our theme is not behaving as one would expect on a production machine.

Thanks for any feedback.
11年前 に Jose Luis Monteagudo によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 32 参加年月日: 10/12/27 最新の投稿
Hello Ken,

I have had to update another time my CSS, and it is working fine for me. I only copied the file main.css from MY_THEME_ROOT/docroot/css/main.css to MY_THEME_ROOT/docroot/_diffs/css/main.css, and it works.

Regards!
11年前 に Bill Dolan によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

New Member 投稿: 16 参加年月日: 10/06/29 最新の投稿
I have this same problem with CSS. I have to completely delete both old WAR file and the /docroot/css folder. Then I build and WAR and deploy and it works. Copying main.css did not work reliably for me.

The weird thing is this is just for my online environment (Liferay 6.1 CE (Paton / Build 6100 / January 6, 2012). My local environment, which is the exact same version works fine with no extra steps, just hot-deploy from eclipse and go. So the only difference is I am using the plug-in installer to deploy in the online environment.
thumbnail
11年前 に Munish Sharma によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 11 参加年月日: 12/07/13 最新の投稿
hi,

Still I have the same problem, I did all the above mentioned changes in my custom theme. Complete process that i have followed:
1) I create a custom theme by Liferay IDE and provide the parent theme as "Classic" by changing in new_theme/docroot/ build.xml file by (<property name value="classic"> tab).
2) It will copy the classic theme in our newly "created theme " , we can see the changes under the docroot/css/custom.css after deploying it.
3) After that I copied the new_theme/docroot/css/custom.css file to new_theme/docroot/_diffs/css/custom.css and also copy the main.css in it.
4) Now if I am trying to change something inside the new_theme/docroot/_diffs/css/custom.css file then , its not effecting on the home page.

Plz help me ASAP.
Any sugestions are welcome...

Best Regard.
thumbnail
11年前 に Munish Sharma によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 11 参加年月日: 12/07/13 最新の投稿
Hi,

Now my changes, which i did in custom.css are reflecting on the home page .
I added the simple below code inside portal-ext.properties file:

include-and-override=portal-developer.properties

Now my custom theme is working fine.

Thanks emoticon,
11年前 に Theoni Zaharia によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 21 参加年月日: 12/02/22 最新の投稿
Munish Sharma:
Hi,

Now my changes, which i did in custom.css are reflecting on the home page .
I added the simple below code inside portal-ext.properties file:

include-and-override=portal-developer.properties

Now my custom theme is working fine.

Thanks emoticon,



That did it for me, too, thanks!
8年前 に Harsha Konagalla によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 14 参加年月日: 14/05/13 最新の投稿
This will enable developer mode for theme which disables template cache etc. Is this okay for production ?
thumbnail
11年前 に Gabriel Ramirez によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 1 参加年月日: 12/10/07 最新の投稿
The problem is a new parser for CSS's in Liferay 6.1, if your CSS has any non complaint code the entire CSS file is rejected and not included in the main.css compiled. Make sure that your CSS is well formated and you are ready to go.
11年前 に Marcin Maciukiewicz によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 24 参加年月日: 12/07/18 最新の投稿
Is there any way to see which error prevent the css to be loaded? I've prepared totally minium modification on the custom.css extracted from the classic theme but it looks like it have been rejected by the compiler.

Or maybe I should refresh some cache?
11年前 に Marcin Maciukiewicz によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 24 参加年月日: 12/07/18 最新の投稿
You have wrote that the css should be well formated - could you post an example of custom.css file which is compiling and correctly used by the liferay?
thumbnail
11年前 に Adel Frad によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 24 参加年月日: 12/08/04 最新の投稿
Try to open the xml file build-common-theme.xml under the themes folder in your sdk and remove all the preservelastmodified="true" (or set them to false).
preservelastmodified, when true will not update the files timestamp in your theme project. Your application server will not detect the changes and redeploy the theme.

www.themeray.com
thumbnail
10年前 に Konstantin Chudinov によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 43 参加年月日: 13/04/23 最新の投稿
Yeah, I have the same issue. And copying main.css doesn't help. It's really annoying to delete .sass-cache folder every time, especially when I'm working on Linux, where ls -l command is not displaying this folder.
rm -rf
is only solution i've found
thumbnail
10年前 に Mirto Silvio Busico によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Regular Member 投稿: 240 参加年月日: 12/01/18 最新の投稿
Just curious,
why you don't use

ls -la

This shows everi .* file
thumbnail
10年前 に Konstantin Chudinov によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 43 参加年月日: 13/04/23 最新の投稿
Of course I can emoticon
But it is still ugly solution - everytime call linux command before deploying theme
11年前 に Ken Sperow によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

New Member 投稿: 11 参加年月日: 11/04/25 最新の投稿
Thanks for figuring this out. I was running into this exact same issue within Linux yesterday and came across this post. I did not have this issue in 6.0.6 but it looks like the .sass-cache was being used then (at least not within our installation).

Copying main.css to the _diffs/css/ folder solved the issue for me as well.

Thanks
thumbnail
11年前 に Orin Fink によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 65 参加年月日: 10/03/25 最新の投稿
Jose Luis Monteagudo:

I think that the problem is related with the new 6.1 version of the plugin SDK. When I execute the task WAR through ANT, it creates a new folder called docroot/css/.saas_cache. Inside this folder I get the file main.css merged with all the css imports that I have in docroot/css/main.css.


I second the notion that something has changed in the 6.1.1 (specifically 6.1.1) version of the SDK. We have been using 6.1 and building deploying just fine for 6 months. After an update to the 6.1.1 SDK, we have now had to start make sure that we delete the {theme-folder}/css, {theme-folder}/js, {theme-folder}/templates (the ones OUTSIDE of {theme-folder}/_diffs. Those are the folders that had been created from a previous ANT run. As long as those folders are removed and we run the ANT WAR against a theme directory that just has _diffs and WEB-INF in it... things seem golden. This should ensure that the newest CSS files are included in the WAR.

I think also that we have noticed this only being an issue when running the build on a server. doesn't seem to be an issue on our development environments.
11年前 に Theoni Zaharia によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

New Member 投稿: 21 参加年月日: 12/02/22 最新の投稿
Hi all!
I experience the same problem, with an installation of liferay 6.1.1 bundled with JBoss. the thing is I cannot find the folder _diffs....It sounds a bit strange, I know, but could it be it has a different name or something in this installation?
thanks in advance!
thumbnail
11年前 に Tirthal Patel によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 4 参加年月日: 11/01/04 最新の投稿
I was getting the same mentioned issue. I implemented theme by extending "classic" as parent theme.

* Problem statement: I am using Liferay SDK 6.1. On windows machine, I was not getting any issue. Then I switched to Linux development environment, imported the same theme project in to Eclipse, built "war" using Liferay SDK and deployed to another Liferay Portal Server. On another server when I applied my developed custom theme, changes were not getting applied.

* Solution worked for me: Liferay SDK -> Execute clean task first and then build war.

* Why it worked? - All custom css files are always under "_diff" folder during Liferay Theme Plugins development, which may include css to override Liferay's OOTB classic theme. Then when we execute "war" build using Liferay SDK, it copies all css files under <theme-name>/css/.sass-cache and in which main.css includes all imported css files code. Due to some odd issue, main.css was not getting updated and hence not reflecting on my deployment server. So I just did "clean" task execution and then "war" build using Liferay plugin SDK. It worked for me.
thumbnail
10年前 に Munish Sharma によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 11 参加年月日: 12/07/13 最新の投稿
Tirthal Patel:
I was getting the same mentioned issue. I implemented theme by extending "classic" as parent theme.

* Problem statement: I am using Liferay SDK 6.1. On windows machine, I was not getting any issue. Then I switched to Linux development environment, imported the same theme project in to Eclipse, built "war" using Liferay SDK and deployed to another Liferay Portal Server. On another server when I applied my developed custom theme, changes were not getting applied.

* Solution worked for me: Liferay SDK -> Execute clean task first and then build war.

* Why it worked? - All custom css files are always under "_diff" folder during Liferay Theme Plugins development, which may include css to override Liferay's OOTB classic theme. Then when we execute "war" build using Liferay SDK, it copies all css files under <theme-name>/css/.sass-cache and in which main.css includes all imported css files code. Due to some odd issue, main.css was not getting updated and hence not reflecting on my deployment server. So I just did "clean" task execution and then "war" build using Liferay plugin SDK. It worked for me.


Hello everyone,

You can try with this solution, I am sure this will work for every developer who is working with theme development :
theme.css.fast.load=false


The purpose of theme.css.fast.load property is to tell whether css should be cached or not. If it is cached, it can be loaded faster.

If you are working on theme development, you will change css code and would like to see the changes on the browser immediately .
Therefore you need to disable caching by setting theme.css.fast.load=false


Regard :
Munish Sharma
thumbnail
10年前 に Peter Dimitri によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 48 参加年月日: 13/01/09 最新の投稿
Has anybody got this problem solved when using the "classic" theme as parent theme, without switching Liferay into developer mode? Yes, it works for me, when I enable developer mode, but that's no solution for a production server. I've tried all suggestions from above, but running "ant clean" before running "ant deploy" only works when my parent theme is the "_styled" theme.
thumbnail
10年前 に Konstantin Chudinov によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 43 参加年月日: 13/04/23 最新の投稿
Peter Dimitri:
Has anybody got this problem solved when using the "classic" theme as parent theme, without switching Liferay into developer mode? Yes, it works for me, when I enable developer mode, but that's no solution for a production server. I've tried all suggestions from above, but running "ant clean" before running "ant deploy" only works when my parent theme is the "_styled" theme.

What do you mean, "developer mode" and "prodaction mode"? what the difference between them in your case?
thumbnail
10年前 に Peter Dimitri によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 48 参加年月日: 13/01/09 最新の投稿
Konstantin Chudinov:

What do you mean, "developer mode" and "prodaction mode"? what the difference between them in your case?


For Information about developer mode see here: http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+Developer+Mode

In nutshell, while your server is in developer mode it sends the style informations of a theme in individual files, which won't be cached by the server, whereas in production mode everything will be read from a single new main.css file, which is generated during the build process from the SDK. Of course this improves the servers performance when serving HTML pages.

Just inspect a page, themed with your custom theme with firebug. As long as the server is set to developer mode, the css you modified in your custom.css will be read from custom.css. Now switch developer mode off and restart the server (no new deployment of the theme!) and now the same css will be read from main.css

When you create a new Liferay Theme with the SDK, there will be a main.css file, which only has some @import statements in it. Here, custom.css will be loaded last, and the styles you define in custom.css will override any conflicting css statements in any css files loaded earlier. You'll find these files in /ThemeFolder/css and they will be used while the server is in developer mode.
But when you switch off developer mode, these files are ignored and instead the files from /ThemeFolder/css/.sass-cache are used, where main.css now is a mixture of the contents from your custom.css and style information of your parent theme. This MAY work, as in my case when I use the "_styled" theme as the parent theme, but there may be conflicting style information in this mixed-up file, as I'm experiencing when I use the "classic" theme as parent theme.

Because in developer mode css files won't be cached by the server, and served as individual files, this slows down the server. That's why I say it's not a solution for this problem in production servers.
thumbnail
10年前 に Llies Meridja によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 25 参加年月日: 11/01/10 最新の投稿
Munish Sharma:


You can try with this solution, I am sure this will work for every developer who is working with theme development :
theme.css.fast.load=false



You could be more precise and tell us where the hell is this theme.css.fast.load property found
10年前 に Bradley Wood によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

thumbnail
10年前 に Llies Meridja によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 25 参加年月日: 11/01/10 最新の投稿
Bradley Wood:
In my bundle, when I'm developing I locate the portal-developer.properties in web apps/ROOT/WEB-INF/classes/
Then I rename it portal-ext.properties
Then restart tomcat


Thanks for the reply - I tried that but didn't seem to make a difference.

The problem I am facing at the moment is that there are some CSS rules that are not in my main theme source at all (custom.css etc...) and yet they are added to the server deployment after the build which somehow adds the .sass-cache folder with a whole lot of CSS rules.

Where are these rules coming from? Is there a hidden area in the SDK from which the themes are getting their source (CSS and possibly something else)?
10年前 に Tino Schwarze によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 2 参加年月日: 12/10/19 最新の投稿
I was able to solve the issue by doing the following:
  • add main.css to _diffs/css
  • modifiy build-common-theme.xml from plugins-sdk (my version: 6.1.20) at line 172
    		<if>
    			<available file="docroot/_diffs" />
    			<then>
    				<copy todir="docroot" overwrite="true"> <!-- REMOVE preservelastmodified="true" -->
    					<fileset dir="docroot/_diffs" />
    				</copy>
    			</then>
    		</if>
    

This forces the main.css in .sass-cache to be recompiled every time I build a war because main.css is copied, last modified time stamp is not preserved and therefore it's newer than the file in .sass-cache.

The proper fix would be to always compile main.css if any depending css has been modified.
10年前 に Martin Kuba によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 1 参加年月日: 13/04/30 最新の投稿
I had the same problem with Liferay 6.1.2 CE GA3 and Plugins SDK version 6.1.1-20130816114619181.

A new theme based on classic works in developer mode, but does not work in production mode. Developer mode is enabled in $CATALINA_BASE/bin/setenv.sh by adding -Dexternal-properties=portal-developer.properties to JAVA_OPTS.

A solution was to add main.css to docs/_diffs/css/ from docs/css/main.css, and to delete the theme webapplication by deleting its folder in $CATALINA_BASE/webapps/ before redeployment.
10年前 に gordon daniels によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Liferay Master 投稿: 797 参加年月日: 08/08/24 最新の投稿
Tino: Thank you for this solution. I was not having any problems and then all of a sudden my theme changes would not take. This has happened in the past, a couple of years ago, and deleting the .sascache directory would solve it. However, it did not work this time, but your solution did.

thanks again
8年前 に Harsha Konagalla によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

New Member 投稿: 14 参加年月日: 14/05/13 最新の投稿
Two things you need to do to resolve this issue temporarily

1. Liferay creates a folder called ".sass-cache" inside "webapps/css" folder and copies all css files into it.
So, whenever you modify some css file under "webapps/css" folder, make sure you have same modified files under ".sass-cache" folder too. If not manually copy and replace them.

2. Add version to stylesheet references or script references. (In portal_normal.vm or navigation.vm etc)
<link rel="stylesheet" href="/portal-theme/css/all.css?2039">
<script type="text/javascript" src="/portal-theme/js/all.js?2039"></script>

After above changes, build the theme and deploy.
Now user need not clear cache or force refresh portal pages to view CSS changes immediately.

Advantages of this method:
1. Issue solved temporarily without teaching user how to refresh or clear cache.

Disadvantages of this method:
1. You cannot automate build process using tools like Bamboo as it involves manual changes.

You may try adding version numbers to references using some math javascript functions.
7年前 に Fabrizio Attanasio によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 54 参加年月日: 16/01/29 最新の投稿
Hi,
I created a custom theme for liferay 6.2. I created it from the IDE Eclipse.
I deployed and everything works properly. Now I would like to figure out how to edit and see "on the fly" updates to css etc ... directly in the portal.
I set the liferay in development mode, and I set the variables in portal-developer.properties file as follows:

theme.css.fast.load = false
layout.template.cache.enabled = false
freemarker.engine.resource.modification.check.interval = 0
minifier.enabled = false
browser.launcher.url = http: //www.google.com

I set the url to google to make sure that the portal was started in development mode and in fact when starting tomcat you open the page of google.
At this point I make a change to the eclipse custom.css in _diffs folder, save, refresh the portal page, but I do not see any changes.
What else should I set?
Thanks and sorry for my english
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Liferay Legend 投稿: 6396 参加年月日: 08/09/23 最新の投稿
Fabrizio Attanasio:
I set the url to google to make sure that the portal was started in development mode and in fact when starting tomcat you open the page of google.
At this point I make a change to the eclipse custom.css in _diffs folder, save, refresh the portal page, but I do not see any changes.
What else should I set?


This typically works for me (at least in 6.2 - it's been a while since I last laid hand on 6.1 themes). Make sure you start Liferay from within eclipse and deploy your theme through the IDE, so that it has a clue that a redeployment is required.
7年前 に Fabrizio Attanasio によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 54 参加年月日: 16/01/29 最新の投稿
yes, i started liferay from eclipse and theme is deployed through eclipse.
Liferay Portal is started in development mode but only if i redeploy theme I see update css but is very slow.
.....
I discovered that I see the changes only if I run: "Clear content cached by this VM." from Server Administration.
Is it normal that every time update css I have to go click on that feature "Clear content cached by this VM."?
Thank you
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: Liferay 6.1does NOT reload CSS changes

Liferay Legend 投稿: 6396 参加年月日: 08/09/23 最新の投稿
Fabrizio Attanasio:
Is it normal that every time update css I have to go click on that feature "Clear content cached by this VM."?


My memory from 6.1 theming is ancient and fading - but this was never an issue. I trust that you did go through the history of this thread and tried the suggestions given above, like copying main.css into your _diffs/css folder etc?
7年前 に Fabrizio Attanasio によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Junior Member 投稿: 54 参加年月日: 16/01/29 最新の投稿
Hi Olaf, thank you.
Today i try to update my portal-developer.properties with this option:

theme.css.fast.load=false
theme.images.fast.load=false
javascript.fast.load=true
javascript.log.enabled=false
layout.template.cache.enabled=false
velocity.engine.resource.manager.cache.enabled=false
com.liferay.portal.servlet.filters.cache.CacheFilter=false
com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true
freemarker.engine.resource.modification.check.interval=0
minifier.enabled=false
browser.launcher.url=

It's ok !
Thank you.... Bye Bye
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: [SOLVED] Liferay 6.1does NOT reload CSS changes

Liferay Legend 投稿: 6396 参加年月日: 08/09/23 最新の投稿
Fabrizio Attanasio:
Hi Olaf, thank you.
Today i try to update my portal-developer.properties with this option:


Looks suspiciously equivalent to the option contained elsewhere in this thread to add this one line:

include-and-override=portal-developer.properties


Good to know it's solved