Changes in clientlibs not picking up until after restart. | Community
Skip to main content
todd_guerra
Level 2
October 16, 2015
Solved

Changes in clientlibs not picking up until after restart.

  • October 16, 2015
  • 6 replies
  • 7892 views

This is the issue I am having:

Sometimes (not always) any changes to CSS and JS in our clientlibs are not actually activating until after a restart of CQ. We've seen this on a prior project, and it only seems to happen with AEM 5.6.1, 5.6 worked correctly. 

Any ideas on why it seems to be caching this CSS? And how we could get this to stop happening?

This is in an author instance, so there is no dispatcher involved. 

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ojjis

I've experienced this as well. Sometimes you need to clear the var/clientlibs/<something> folder.
One way of solving this would be to have an empty folder (with the same structure) that you include in your build that would overwrite/clear that directory every time.

Maybe there's a better solution to this out there
/Johan

6 replies

Sham_HC
Level 10
October 16, 2015

Are you sure it is 5.6.1 & If so please file a daycare.

See if restarting only the component [1] helps.

 [1]   http://<host>:<port>/system/console/components/com.day.cq.widget.impl.HtmlLibraryManagerImpl

Ojjis
OjjisAccepted solution
Level 7
October 16, 2015

I've experienced this as well. Sometimes you need to clear the var/clientlibs/<something> folder.
One way of solving this would be to have an empty folder (with the same structure) that you include in your build that would overwrite/clear that directory every time.

Maybe there's a better solution to this out there
/Johan

Level 2
October 16, 2015

The approach Ojjis suggests has been working for us.

@Sham HC, we're using v5.4, but considering an upgrade. Is this behavior that has changed between there and 5.6?

October 16, 2015

Experienced the same rather frustrating behavior today. We are using Adobe CQ 5.6.0.20130125. I invalidated the cache (localhost:4502/libs/granite/ui/content/dumplibs.rebuild.html) and restarted AEM and Clientlib and underneath JavaScript (included in the generated clientlib.js) turned out to be correct this time .... Still, rather frustrating and I'm inclined to be a tad concerned on stability. 

todd_guerra
Level 2
October 16, 2015

THis seems like the best option, thank you! This only happens SOMETIMES, which is the odd thing. 

October 16, 2015

One additional update on this topic and maybe my analysis was not entirely correct; 

As explained in other documents, AEM uses the property "categories" as the identifier/identifiers to publish the clientlib. This identifier should correspond with the value as used by the <cq:includeClientLib> tag in the JSP page. Make sure you don't have multiple versions of a clientlib folder with the same identifier. This scenario might occur when you copy/paste by example a complete component or project (in the context of a backup). If you would end up within this scenario and you start making modifications in the CSS or JS file of your actual project, very likely your changes will not be visible (since a clientlib with an identical identifier but the old CSS or JS still exists). 

The utility http://localhost:4502/libs/granite/ui/content/dumplibs..html allows to view the dependencies between libraries and to list/retrieve all libraries really well.