AEM 6.3 Rebuild Client Libraries not working | Community
Skip to main content
June 21, 2018

AEM 6.3 Rebuild Client Libraries not working

  • June 21, 2018
  • 5 replies
  • 7942 views

Hi everyone,

I've just activated the Adobe Html Library Manager minify in /system/console/configMgr, so now every ClientLibrary is called .min.css or .min.js.

Here's my problem: the ClientLibraries are not updated until I edit the file, even with only one space, and in this way the ClientLibrary is builded again. Looking into other discussions, everyone suggests using /libs/granite/ui/content/dumplibs.rebuild.html, but using this tool, either invalidating and rebuilding all ClientLibraries, there are no changes in them.
Unfortunately, I have a lot of ClientLibraries, so I can not take one for one and modify them to be re-created.


Do you have any solution? Thanks in advance and have a nice day!

Daniel

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

5 replies

arunpatidar
Community Advisor
Community Advisor
June 21, 2018

Hi,

you can delete all your client libs from /var/clientlibs

then next time it will be rebuild again automatically.

Thanks

Arun

Arun Patidar
June 21, 2018

Thanks Arun,

but as already mentioned, I have already done this operation through the tool "/libs/granite/ui/content/dumplibs.rebuild.html?validate=true" which does nothing but clean the location /var/clientlibs. It doesn't work.

June 21, 2018

I tried also to change the CSS Minify processor (from "yui" to "yux" and then again correctly to "yui"), but nothing. I tried also to restart the machine, but nothing. Everything I try, the only case in which the ClientLibrary updates itself is when I modify a file in it.

arunpatidar
Community Advisor
Community Advisor
June 21, 2018

Hi,

I tried deleting my clientlibs(myApp) from /var/clientlibs/etc/myApp folder in AEM 6.3 and reloaded the page which referred clientLibs. Once page is loaded /var/clientlibs/etc/myApp folder is created again with minified clientlibs.

Which AEM version are you using?

Arun Patidar
June 22, 2018

The problem is that in my machine the /var/clientlibs folder is empty, but the css files don't update themselves.

I've AEM 6.3.2.1

June 22, 2018

Hi Arun, and everyone,

maybe I found a solution. When I was about to lose every hope, I tried to review the configuration of "Adobe Granite HTML Library Manager" on /system/console/configMgr looking for something that could be useful to our cause.

So I saw the option "Long term client side cache key" (Description: "The path pattern list for long-caching in the format" regexp; key ". If key equals to 'auto' it is automatically generated when this service restarts use 'none' to disable it.) and I tried to set "(. *); auto". And incredibly, the ClientLibrary has updated!!!!

But it is absurd that the "rebuild" and "invalidate" operations of the tool offered by AEM just for this cause, do not work, and no other operation works, except this configuration.

Bye bye (and thank you again Arun ) and have a good day and weekend!

Daniel

arunpatidar
Community Advisor
Community Advisor
June 22, 2018

cool

Thanks and I believe you will be having a nice weekend too after all you've found a solution

Cheer

Arun

Arun Patidar
June 22, 2018

arunp99088702

As unsaid Arun: ((((

That field "Long term client side cache key" is related to the next field "Long term cache key format", which by default is "lc-% s-lc". And these two settings combined change the name of the file in "{filename}.lc- {timestamp}-lc.min.css" (e.g.: main.lc-9484393.min.css). This solution was not what I need and it creates also obvious caching problems, because the css inclusion is in the head, so for every css/js update in production, I should clear the entire cache of my site on dispatcher.

So the problem has remained unresolved, these damn ClientLibraries are not invalidated.

D.

Level 2
July 18, 2018

Hey did you find any solution for this.

Thanks,

Pradeep

Adobe Employee
December 18, 2018

Everyone is looking at this the wrong way.

In AEM 6.3 and 6.4 the client libraries are persisted on the file system. They no longer live under /var

Under one of the bundles (bundle248 on my local) there is an outputcache directory. Within this directory is where the compiled client libraries live.

For example on an AEM 6.3.3.0 instance:

\AEM 6.3\6.3.3.0\crx-quickstart\launchpad\felix\bundle248\data\outputcache

\apps

\etc

\libs

This is all documented here : How to force a recompilation of all Sling scripts jsps, java, and sightly in AEM 6.4

May 8, 2019

Thanks for this answer you helped me a lot.