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.
If you follow Versioned ClientLibs, then this is all you need. No need for "default" node under rewriter as you mentioned.
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
Below is the screenshot of the configuration done
I ran a page from AEM, checked the source code. The js file should be appended with a query parameter, which is not getting done.
Please note, All the bundles are active, and Enforce MD5 is checked in Versioned Clientlibs Transformer Factory.
What works for me in my local is
The same config is mentioned @ Versioned ClientLibs
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
I've not enforced MD5 in my local and it works fine. Per docs
Optionally, a filter can registered which checks incoming requests for client libraries and ensures that the hash in the path is the correct value
Thanks. But in libs > cq > config > rewriter, the default node is nt:unstructured. So when I copied, it became nt:unstructured. If manually I create the default node by choosing jcr:primaryType as sling:Folder then it appears as a folder and NOT as a node.
I am using AEM 6.1.