Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
[SOLVED] Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo April 20, 2012 5:56 AM
RE: Liferay 6.1does NOT reload CSS changes Oliver Bayer April 17, 2012 1:02 AM
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo April 17, 2012 3:20 AM
RE: Liferay 6.1does NOT reload CSS changes David H Nebinger April 17, 2012 7:38 AM
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo April 17, 2012 9:23 AM
RE: Liferay 6.1does NOT reload CSS changes David H Nebinger April 17, 2012 9:26 AM
RE: Liferay 6.1does NOT reload CSS changes Hitoshi Ozawa April 17, 2012 2:33 PM
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo April 19, 2012 1:23 AM
RE: Liferay 6.1does NOT reload CSS changes Olaf Kock April 19, 2012 2:07 AM
RE: Liferay 6.1does NOT reload CSS changes Alberto Chaparro April 17, 2012 10:13 AM
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo April 19, 2012 1:15 AM
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo April 20, 2012 5:55 AM
RE: Liferay 6.1does NOT reload CSS changes David H Nebinger April 20, 2012 6:04 AM
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo April 20, 2012 7:59 AM
RE: Liferay 6.1does NOT reload CSS changes David H Nebinger April 20, 2012 9:27 AM
RE: Liferay 6.1does NOT reload CSS changes Ken Sperow April 20, 2012 1:53 PM
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo April 23, 2012 12:03 AM
RE: Liferay 6.1does NOT reload CSS changes Bill Dolan May 18, 2012 5:54 PM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Munish Sharma August 1, 2012 5:40 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Munish Sharma August 1, 2012 6:27 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Theoni Zaharia September 14, 2012 8:16 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Gabriel Ramirez October 6, 2012 8:21 PM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Marcin Maciukiewicz October 10, 2012 6:13 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Marcin Maciukiewicz October 10, 2012 6:15 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Adel Frad January 14, 2013 2:43 PM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Konstantin Chudinov May 12, 2013 1:08 PM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Mirto Silvio Busico May 12, 2013 11:10 PM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Konstantin Chudinov May 12, 2013 11:39 PM
RE: Liferay 6.1does NOT reload CSS changes Ken Sperow April 20, 2012 9:29 AM
RE: Liferay 6.1does NOT reload CSS changes Orin Fink August 23, 2012 11:23 AM
RE: Liferay 6.1does NOT reload CSS changes Theoni Zaharia September 14, 2012 8:15 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Tirthal Patel February 1, 2013 3:51 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Munish Sharma May 15, 2013 1:20 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Peter Dimitri May 16, 2013 8:34 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Konstantin Chudinov May 16, 2013 11:08 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Peter Dimitri May 17, 2013 12:51 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Llies Meridja June 23, 2013 1:49 PM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Bradley Wood June 23, 2013 2:48 PM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Llies Meridja June 24, 2013 2:05 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Tino Schwarze July 17, 2013 11:59 PM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Martin Kuba September 17, 2013 2:51 AM
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes gordon daniels October 2, 2013 10:05 AM
Jose Luis Monteagudo
[SOLVED] Liferay 6.1does NOT reload CSS changes
April 20, 2012 5:56 AM
Answer

Jose Luis Monteagudo

Rank: Junior Member

Posts: 32

Join Date: December 27, 2010

Recent Posts

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.
Oliver Bayer
RE: Liferay 6.1does NOT reload CSS changes
April 17, 2012 1:02 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 872

Join Date: February 18, 2009

Recent Posts

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
Jose Luis Monteagudo
RE: Liferay 6.1does NOT reload CSS changes
April 17, 2012 3:20 AM
Answer

Jose Luis Monteagudo

Rank: Junior Member

Posts: 32

Join Date: December 27, 2010

Recent Posts

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.
David H Nebinger
RE: Liferay 6.1does NOT reload CSS changes
April 17, 2012 7:38 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6736

Join Date: September 1, 2006

Recent Posts

Because your browser is caching the CSS. Clear your browser's cache and you'll get the updated CSS.
Jose Luis Monteagudo
RE: Liferay 6.1does NOT reload CSS changes
April 17, 2012 9:23 AM
Answer

Jose Luis Monteagudo

Rank: Junior Member

Posts: 32

Join Date: December 27, 2010

Recent Posts

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.
David H Nebinger
RE: Liferay 6.1does NOT reload CSS changes
April 17, 2012 9:26 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6736

Join Date: September 1, 2006

Recent Posts

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...
Alberto Chaparro
RE: Liferay 6.1does NOT reload CSS changes
April 17, 2012 10:13 AM
Answer

Alberto Chaparro

LIFERAY STAFF

Rank: Junior Member

Posts: 99

Join Date: April 25, 2011

Recent Posts

Hi Jose Luis,

Could you do the following test without the parameter include-and-override=portal-developer.properties?
  1. Visit one page in your portal
  2. Change your theme and deploy it
  3. Clean your browser cache
  4. Visit that previous page
  5. Login in the portal
  6. 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.
Hitoshi Ozawa
RE: Liferay 6.1does NOT reload CSS changes
April 17, 2012 2:33 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

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.
Jose Luis Monteagudo
RE: Liferay 6.1does NOT reload CSS changes
April 19, 2012 1:15 AM
Answer

Jose Luis Monteagudo

Rank: Junior Member

Posts: 32

Join Date: December 27, 2010

Recent Posts

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!
Jose Luis Monteagudo
RE: Liferay 6.1does NOT reload CSS changes
April 19, 2012 1:23 AM
Answer

Jose Luis Monteagudo

Rank: Junior Member

Posts: 32

Join Date: December 27, 2010

Recent Posts

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.
Olaf Kock
RE: Liferay 6.1does NOT reload CSS changes
April 19, 2012 2:07 AM
Answer

Olaf Kock

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1826

Join Date: September 23, 2008

Recent Posts

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
Jose Luis Monteagudo
RE: Liferay 6.1does NOT reload CSS changes
April 20, 2012 5:55 AM
Answer

Jose Luis Monteagudo

Rank: Junior Member

Posts: 32

Join Date: December 27, 2010

Recent Posts

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!
David H Nebinger
RE: Liferay 6.1does NOT reload CSS changes
April 20, 2012 6:04 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6736

Join Date: September 1, 2006

Recent Posts

Hmm, if you copy the main.css into the diffs_/css folder, would it force the update during the build?
Jose Luis Monteagudo
RE: Liferay 6.1does NOT reload CSS changes
April 20, 2012 7:59 AM
Answer

Jose Luis Monteagudo

Rank: Junior Member

Posts: 32

Join Date: December 27, 2010

Recent Posts

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!!
David H Nebinger
RE: Liferay 6.1does NOT reload CSS changes
April 20, 2012 9:27 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6736

Join Date: September 1, 2006

Recent Posts

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!
Ken Sperow
RE: Liferay 6.1does NOT reload CSS changes
April 20, 2012 9:29 AM
Answer

Ken Sperow

Rank: New Member

Posts: 9

Join Date: April 25, 2011

Recent Posts

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
Ken Sperow
RE: Liferay 6.1does NOT reload CSS changes
April 20, 2012 1:53 PM
Answer

Ken Sperow

Rank: New Member

Posts: 9

Join Date: April 25, 2011

Recent Posts

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.
Jose Luis Monteagudo
RE: Liferay 6.1does NOT reload CSS changes
April 23, 2012 12:03 AM
Answer

Jose Luis Monteagudo

Rank: Junior Member

Posts: 32

Join Date: December 27, 2010

Recent Posts

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!
Bill Dolan
RE: Liferay 6.1does NOT reload CSS changes
May 18, 2012 5:54 PM
Answer

Bill Dolan

Rank: New Member

Posts: 16

Join Date: June 28, 2010

Recent Posts

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.
Munish Sharma
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
August 1, 2012 5:40 AM
Answer

Munish Sharma

Rank: New Member

Posts: 11

Join Date: July 13, 2012

Recent Posts

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.
Munish Sharma
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
August 1, 2012 6:27 AM
Answer

Munish Sharma

Rank: New Member

Posts: 11

Join Date: July 13, 2012

Recent Posts

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,
Orin Fink
RE: Liferay 6.1does NOT reload CSS changes
August 23, 2012 11:23 AM
Answer

Orin Fink

Rank: Junior Member

Posts: 40

Join Date: March 24, 2010

Recent Posts

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.
Theoni Zaharia
RE: Liferay 6.1does NOT reload CSS changes
September 14, 2012 8:15 AM
Answer

Theoni Zaharia

Rank: New Member

Posts: 21

Join Date: February 21, 2012

Recent Posts

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!
Theoni Zaharia
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
September 14, 2012 8:16 AM
Answer

Theoni Zaharia

Rank: New Member

Posts: 21

Join Date: February 21, 2012

Recent Posts

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!
Gabriel Ramirez
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
October 6, 2012 8:21 PM
Answer

Gabriel Ramirez

Rank: New Member

Posts: 1

Join Date: October 6, 2012

Recent Posts

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.
Marcin Maciukiewicz
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
October 10, 2012 6:13 AM
Answer

Marcin Maciukiewicz

Rank: New Member

Posts: 24

Join Date: July 18, 2012

Recent Posts

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?
Marcin Maciukiewicz
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
October 10, 2012 6:15 AM
Answer

Marcin Maciukiewicz

Rank: New Member

Posts: 24

Join Date: July 18, 2012

Recent Posts

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?
Adel Frad
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
January 14, 2013 2:43 PM
Answer

Adel Frad

Rank: New Member

Posts: 23

Join Date: August 4, 2012

Recent Posts

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
Tirthal Patel
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
February 1, 2013 3:51 AM
Answer

Tirthal Patel

Rank: New Member

Posts: 4

Join Date: January 3, 2011

Recent Posts

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.
Konstantin Chudinov
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
May 12, 2013 1:08 PM
Answer

Konstantin Chudinov

Rank: Junior Member

Posts: 42

Join Date: April 23, 2013

Recent Posts

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
Mirto Silvio Busico
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
May 12, 2013 11:10 PM
Answer

Mirto Silvio Busico

Rank: Junior Member

Posts: 94

Join Date: January 18, 2012

Recent Posts

Just curious,
why you don't use

ls -la

This shows everi .* file
Konstantin Chudinov
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
May 12, 2013 11:39 PM
Answer

Konstantin Chudinov

Rank: Junior Member

Posts: 42

Join Date: April 23, 2013

Recent Posts

Of course I can emoticon
But it is still ugly solution - everytime call linux command before deploying theme
Munish Sharma
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
May 15, 2013 1:20 AM
Answer

Munish Sharma

Rank: New Member

Posts: 11

Join Date: July 13, 2012

Recent Posts

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
Peter Dimitri
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
May 16, 2013 8:34 AM
Answer

Peter Dimitri

Rank: Junior Member

Posts: 35

Join Date: January 9, 2013

Recent Posts

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.
Konstantin Chudinov
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
May 16, 2013 11:08 AM
Answer

Konstantin Chudinov

Rank: Junior Member

Posts: 42

Join Date: April 23, 2013

Recent Posts

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?
Peter Dimitri
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
May 17, 2013 12:51 AM
Answer

Peter Dimitri

Rank: Junior Member

Posts: 35

Join Date: January 9, 2013

Recent Posts

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.
Llies Meridja
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
June 23, 2013 1:49 PM
Answer

Llies Meridja

Rank: New Member

Posts: 18

Join Date: January 10, 2011

Recent Posts

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
Anonymous
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
June 23, 2013 2:48 PM
Answer

Anonymous

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
Llies Meridja
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
June 24, 2013 2:05 AM
Answer

Llies Meridja

Rank: New Member

Posts: 18

Join Date: January 10, 2011

Recent Posts

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)?
Tino Schwarze
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
July 17, 2013 11:59 PM
Answer

Tino Schwarze

Rank: New Member

Posts: 2

Join Date: October 19, 2012

Recent Posts

I was able to solve the issue by doing the following:
  1. add main.css to _diffs/css
  2. modifiy build-common-theme.xml from plugins-sdk (my version: 6.1.20) at line 172
     1        <if>
     2            <available file="docroot/_diffs" />
     3            <then>
     4                <copy todir="docroot" overwrite="true" > <!-- REMOVE preservelastmodified="true" -->
     5                    <fileset
     6                        dir="docroot/_diffs"
     7                    />
     8                </copy>
     9            </then>
    10        </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.
Martin Kuba
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
September 17, 2013 2:51 AM
Answer

Martin Kuba

Rank: New Member

Posts: 1

Join Date: April 30, 2013

Recent Posts

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.
gordon daniels
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
October 2, 2013 10:05 AM
Answer

gordon daniels

Rank: Liferay Master

Posts: 650

Join Date: August 23, 2008

Recent Posts

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