Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
[SOLVED] Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo 20 avril 2012 05:56
RE: Liferay 6.1does NOT reload CSS changes Oliver Bayer 17 avril 2012 01:02
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo 17 avril 2012 03:20
RE: Liferay 6.1does NOT reload CSS changes David H Nebinger 17 avril 2012 07:38
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo 17 avril 2012 09:23
RE: Liferay 6.1does NOT reload CSS changes David H Nebinger 17 avril 2012 09:26
RE: Liferay 6.1does NOT reload CSS changes Hitoshi Ozawa 17 avril 2012 14:33
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo 19 avril 2012 01:23
RE: Liferay 6.1does NOT reload CSS changes Olaf Kock 19 avril 2012 02:07
RE: Liferay 6.1does NOT reload CSS changes Alberto Chaparro 17 avril 2012 10:13
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo 19 avril 2012 01:15
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo 20 avril 2012 05:55
RE: Liferay 6.1does NOT reload CSS changes David H Nebinger 20 avril 2012 06:04
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo 20 avril 2012 07:59
RE: Liferay 6.1does NOT reload CSS changes David H Nebinger 20 avril 2012 09:27
RE: Liferay 6.1does NOT reload CSS changes Ken Sperow 20 avril 2012 13:53
RE: Liferay 6.1does NOT reload CSS changes Jose Luis Monteagudo 23 avril 2012 00:03
RE: Liferay 6.1does NOT reload CSS changes Bill Dolan 18 mai 2012 17:54
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Munish Sharma 1 août 2012 05:40
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Munish Sharma 1 août 2012 06:27
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Theoni Zaharia 14 septembre 2012 08:16
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Harsha Konagalla 23 juillet 2015 02:04
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Gabriel Ramirez 6 octobre 2012 20:21
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Marcin Maciukiewicz 10 octobre 2012 06:13
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Marcin Maciukiewicz 10 octobre 2012 06:15
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Adel Frad 14 janvier 2013 14:43
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Konstantin Chudinov 12 mai 2013 13:08
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Mirto Silvio Busico 12 mai 2013 23:10
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Konstantin Chudinov 12 mai 2013 23:39
RE: Liferay 6.1does NOT reload CSS changes Ken Sperow 20 avril 2012 09:29
RE: Liferay 6.1does NOT reload CSS changes Orin Fink 23 août 2012 11:23
RE: Liferay 6.1does NOT reload CSS changes Theoni Zaharia 14 septembre 2012 08:15
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Tirthal Patel 1 février 2013 03:51
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Munish Sharma 15 mai 2013 01:20
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Peter Dimitri 16 mai 2013 08:34
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Konstantin Chudinov 16 mai 2013 11:08
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Peter Dimitri 17 mai 2013 00:51
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Yaseen L Meridjal 23 juin 2013 13:49
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Bradley Wood 23 juin 2013 14:48
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Yaseen L Meridjal 24 juin 2013 02:05
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Tino Schwarze 17 juillet 2013 23:59
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Martin Kuba 17 septembre 2013 02:51
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes gordon daniels 2 octobre 2013 10:05
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Harsha Konagalla 23 juillet 2015 01:55
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Fabrizio Attanasio 20 mars 2017 06:33
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Olaf Kock 20 mars 2017 07:01
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Fabrizio Attanasio 20 mars 2017 08:45
RE: Liferay 6.1does NOT reload CSS changes Olaf Kock 21 mars 2017 00:15
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Fabrizio Attanasio 21 mars 2017 02:27
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes Olaf Kock 21 mars 2017 08:56
Jose Luis Monteagudo
[SOLVED] Liferay 6.1does NOT reload CSS changes
20 avril 2012 05:56
Réponse

Jose Luis Monteagudo

Rang: Junior Member

Publications: 32

Date d'inscription: 27 décembre 2010

Publications Récentes

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
17 avril 2012 01:02
Réponse

Oliver Bayer

Rang: Liferay Master

Publications: 889

Date d'inscription: 18 février 2009

Publications Récentes

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
17 avril 2012 03:20
Réponse

Jose Luis Monteagudo

Rang: Junior Member

Publications: 32

Date d'inscription: 27 décembre 2010

Publications Récentes

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
17 avril 2012 07:38
Réponse

David H Nebinger

Community Moderator

Rang: Liferay Legend

Publications: 12513

Date d'inscription: 1 septembre 2006

Publications Récentes

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
17 avril 2012 09:23
Réponse

Jose Luis Monteagudo

Rang: Junior Member

Publications: 32

Date d'inscription: 27 décembre 2010

Publications Récentes

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
17 avril 2012 09:26
Réponse

David H Nebinger

Community Moderator

Rang: Liferay Legend

Publications: 12513

Date d'inscription: 1 septembre 2006

Publications Récentes

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
17 avril 2012 10:13
Réponse

Alberto Chaparro

LIFERAY STAFF

Rang: Regular Member

Publications: 204

Date d'inscription: 25 avril 2011

Publications Récentes

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
17 avril 2012 14:33
Réponse

Hitoshi Ozawa

Rang: Liferay Legend

Publications: 7949

Date d'inscription: 23 mars 2010

Publications Récentes

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
19 avril 2012 01:15
Réponse

Jose Luis Monteagudo

Rang: Junior Member

Publications: 32

Date d'inscription: 27 décembre 2010

Publications Récentes

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
19 avril 2012 01:23
Réponse

Jose Luis Monteagudo

Rang: Junior Member

Publications: 32

Date d'inscription: 27 décembre 2010

Publications Récentes

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
19 avril 2012 02:07
Réponse

Olaf Kock

LIFERAY STAFF

Rang: Liferay Legend

Publications: 3823

Date d'inscription: 23 septembre 2008

Publications Récentes

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
20 avril 2012 05:55
Réponse

Jose Luis Monteagudo

Rang: Junior Member

Publications: 32

Date d'inscription: 27 décembre 2010

Publications Récentes

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
20 avril 2012 06:04
Réponse

David H Nebinger

Community Moderator

Rang: Liferay Legend

Publications: 12513

Date d'inscription: 1 septembre 2006

Publications Récentes

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
20 avril 2012 07:59
Réponse

Jose Luis Monteagudo

Rang: Junior Member

Publications: 32

Date d'inscription: 27 décembre 2010

Publications Récentes

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
20 avril 2012 09:27
Réponse

David H Nebinger

Community Moderator

Rang: Liferay Legend

Publications: 12513

Date d'inscription: 1 septembre 2006

Publications Récentes

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
20 avril 2012 09:29
Réponse

Ken Sperow

Rang: New Member

Publications: 10

Date d'inscription: 25 avril 2011

Publications Récentes

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
20 avril 2012 13:53
Réponse

Ken Sperow

Rang: New Member

Publications: 10

Date d'inscription: 25 avril 2011

Publications Récentes

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
23 avril 2012 00:03
Réponse

Jose Luis Monteagudo

Rang: Junior Member

Publications: 32

Date d'inscription: 27 décembre 2010

Publications Récentes

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
18 mai 2012 17:54
Réponse

Bill Dolan

Rang: New Member

Publications: 16

Date d'inscription: 28 juin 2010

Publications Récentes

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
1 août 2012 05:40
Réponse

Munish Sharma

Rang: New Member

Publications: 11

Date d'inscription: 13 juillet 2012

Publications Récentes

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
1 août 2012 06:27
Réponse

Munish Sharma

Rang: New Member

Publications: 11

Date d'inscription: 13 juillet 2012

Publications Récentes

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
23 août 2012 11:23
Réponse

Orin Fink

Rang: Junior Member

Publications: 49

Date d'inscription: 24 mars 2010

Publications Récentes

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
14 septembre 2012 08:15
Réponse

Theoni Zaharia

Rang: New Member

Publications: 21

Date d'inscription: 21 février 2012

Publications Récentes

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
14 septembre 2012 08:16
Réponse

Theoni Zaharia

Rang: New Member

Publications: 21

Date d'inscription: 21 février 2012

Publications Récentes

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
6 octobre 2012 20:21
Réponse

Gabriel Ramirez

Rang: New Member

Publications: 1

Date d'inscription: 6 octobre 2012

Publications Récentes

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
10 octobre 2012 06:13
Réponse

Marcin Maciukiewicz

Rang: New Member

Publications: 24

Date d'inscription: 18 juillet 2012

Publications Récentes

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
10 octobre 2012 06:15
Réponse

Marcin Maciukiewicz

Rang: New Member

Publications: 24

Date d'inscription: 18 juillet 2012

Publications Récentes

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
14 janvier 2013 14:43
Réponse

Adel Frad

Rang: New Member

Publications: 24

Date d'inscription: 4 août 2012

Publications Récentes

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
1 février 2013 03:51
Réponse

Tirthal Patel

Rang: New Member

Publications: 4

Date d'inscription: 3 janvier 2011

Publications Récentes

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
12 mai 2013 13:08
Réponse

Konstantin Chudinov

Rang: Junior Member

Publications: 43

Date d'inscription: 23 avril 2013

Publications Récentes

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
12 mai 2013 23:10
Réponse

Mirto Silvio Busico

Rang: Regular Member

Publications: 137

Date d'inscription: 18 janvier 2012

Publications Récentes

Just curious,
why you don't use

ls -la

This shows everi .* file
Konstantin Chudinov
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
12 mai 2013 23:39
Réponse

Konstantin Chudinov

Rang: Junior Member

Publications: 43

Date d'inscription: 23 avril 2013

Publications Récentes

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
15 mai 2013 01:20
Réponse

Munish Sharma

Rang: New Member

Publications: 11

Date d'inscription: 13 juillet 2012

Publications Récentes

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
16 mai 2013 08:34
Réponse

Peter Dimitri

Rang: Junior Member

Publications: 48

Date d'inscription: 9 janvier 2013

Publications Récentes

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
16 mai 2013 11:08
Réponse

Konstantin Chudinov

Rang: Junior Member

Publications: 43

Date d'inscription: 23 avril 2013

Publications Récentes

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
17 mai 2013 00:51
Réponse

Peter Dimitri

Rang: Junior Member

Publications: 48

Date d'inscription: 9 janvier 2013

Publications Récentes

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.
Yaseen L Meridjal
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
23 juin 2013 13:49
Réponse

Yaseen L Meridjal

Rang: Junior Member

Publications: 25

Date d'inscription: 10 janvier 2011

Publications Récentes

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
Anonyme
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
23 juin 2013 14:48
Réponse

Anonyme

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
Yaseen L Meridjal
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
24 juin 2013 02:05
Réponse

Yaseen L Meridjal

Rang: Junior Member

Publications: 25

Date d'inscription: 10 janvier 2011

Publications Récentes

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
17 juillet 2013 23:59
Réponse

Tino Schwarze

Rang: New Member

Publications: 2

Date d'inscription: 19 octobre 2012

Publications Récentes

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
17 septembre 2013 02:51
Réponse

Martin Kuba

Rang: New Member

Publications: 1

Date d'inscription: 30 avril 2013

Publications Récentes

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
2 octobre 2013 10:05
Réponse

gordon daniels

Rang: Liferay Master

Publications: 735

Date d'inscription: 23 août 2008

Publications Récentes

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
Harsha Konagalla
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
23 juillet 2015 01:55
Réponse

Harsha Konagalla

Rang: New Member

Publications: 12

Date d'inscription: 12 mai 2014

Publications Récentes

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.
Harsha Konagalla
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
23 juillet 2015 02:04
Réponse

Harsha Konagalla

Rang: New Member

Publications: 12

Date d'inscription: 12 mai 2014

Publications Récentes

This will enable developer mode for theme which disables template cache etc. Is this okay for production ?
Fabrizio Attanasio
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
20 mars 2017 06:33
Réponse

Fabrizio Attanasio

Rang: New Member

Publications: 15

Date d'inscription: 29 janvier 2016

Publications Récentes

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
Olaf Kock
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
20 mars 2017 07:01
Réponse

Olaf Kock

LIFERAY STAFF

Rang: Liferay Legend

Publications: 3823

Date d'inscription: 23 septembre 2008

Publications Récentes

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.
Fabrizio Attanasio
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
20 mars 2017 08:45
Réponse

Fabrizio Attanasio

Rang: New Member

Publications: 15

Date d'inscription: 29 janvier 2016

Publications Récentes

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
Olaf Kock
RE: Liferay 6.1does NOT reload CSS changes
21 mars 2017 00:15
Réponse

Olaf Kock

LIFERAY STAFF

Rang: Liferay Legend

Publications: 3823

Date d'inscription: 23 septembre 2008

Publications Récentes

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?
Fabrizio Attanasio
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
21 mars 2017 02:27
Réponse

Fabrizio Attanasio

Rang: New Member

Publications: 15

Date d'inscription: 29 janvier 2016

Publications Récentes

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
Olaf Kock
RE: [SOLVED] Liferay 6.1does NOT reload CSS changes
21 mars 2017 08:56
Réponse

Olaf Kock

LIFERAY STAFF

Rang: Liferay Legend

Publications: 3823

Date d'inscription: 23 septembre 2008

Publications Récentes

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:

1include-and-override=portal-developer.properties


Good to know it's solved