Combination View Flat View Tree View
Threads [ Previous | Next ]
Showing 1 - 20 of 43 results.
of 3
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: 875

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: 7250

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: 7250

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: Regular Member

Posts: 100

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: 7954

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: 1961

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: 7250

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: 7250

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: 8

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: 8

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.
Showing 1 - 20 of 43 results.
of 3