Client Library Versioning in AEM 6.1 | Community
Skip to main content
March 1, 2019

Client Library Versioning in AEM 6.1

  • March 1, 2019
  • 3 replies
  • 6587 views

Hi All,

I tried to do clientlibs versioning in AEM 6.1 by creating rewriter sling-folder and copying the 'default' node from libs > cq > config > rewriter. But its not working and the whole AEM local instance in getting corrupted. Error log is showing "Unable to get component of class 'interface org.apache.sling.rewriter.Transformer' with type 'versioned-clientlibs'."

Tried from the link http://www.aemcq5tutorials.com/tutorials/versioned-clientlibs-aem/

Any kind of help would be appreciated.

Regards,

Abhijit Chowdhury

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

3 replies

joerghoh
Adobe Employee
Adobe Employee
March 1, 2019

You should have ACS AEM Commons installed to make this work.

abhijitchAuthor
March 4, 2019

ACS AEM Commons is already installed. Still it is not working.

Gaurav-Behl
Level 10
March 4, 2019

If you follow Versioned ClientLibs, then this is all you need. No need for "default" node under rewriter as you mentioned.

/apps/<myapp>/config/rewriter/versioned-clientlibs.xml

The easiest way to configure the rewriter pipline is just to copy /libs/cq/config/rewriter/default to a path inside your application, e.g. /apps/myapp/config/rewriter/versioned-clientlibs. Note that the configuration node must be inside a four-level path that ends in config/rewriter

smacdonald2008
Level 10
March 4, 2019

See Versioned ClientLibs

YOu can comment at that URL too for questions why its not working.

Level 2
March 26, 2019

Hi

I am on AEM 6.4 too. For me it is even stranger... I seems to work with a node of type nt:unstructured, but only on AUTHOR instance with a url which contains the /editor.html/ for triggering the authoring widgets in it. If I leave out the /editor.html, the md5 hashes disappear from all the clientlib references in the HTML markup.

On PUBLISH the feature doesn't seem to be active either (due to not using editor.html in the url?)

I have no idea why this is happening. Any hints?

Gaurav-Behl
Level 10
March 26, 2019

Probably, it is enabled/tied to runmode configuration

Check if you have "config.author" or similar rather than "config" folder in your setup:    /apps/myapp/config/rewriter/versioned-clientlibs.xml

Level 2
March 27, 2019

Good to know that it worked for you, however, I don't see any URI/URL path in this configuration. Its only resource path or resource type. "/editor.html" is not a part of any resource path but url path, that explains why it was broken.

Yes, order/rank would matter.


I stated in my post "in our project" so ofcourse there is no path in this configuration. The screenshots above are not related to my project and the url I posted points to your own running AEM instance?

Furthermore I believe that the screenshots with the black rectangles is flawed in a sense that it also mentions content types text/javascript and text/css? In my understanding you want to rewrite links inside a text/html response which point to a clientlib. So I don't understand why you would need to mention the other resource types. The ACS Commons feature mentions that it doesn't work for references inside javascript or css files I believe. I guess it doesn't break anything, but as I am getting such nice feedback here I wanted to bounce my idea so hopefully someone can confirm or reject it.