Last updated on
May 18, 2021
|
Also applies to CQ 5.5
Issue
CQ uses YUI Compressor to control the handling of client libraries for JavaScript and CSS minification to preserve the operational qualities of the code while reducing its overall byte footprint. The cq5.5 uses yuicompressor-2.3.6.jar. The latest yuicompressor-2.4.7.jar includes fixes for several bugs, such as media queries handling.
Solution
- Find the bundle that has yuicompressor. In CQ5.5, the bundle is Adobe Granite UI Commons (com.day.cq.cq-widgets) http://<host>:<port>/system/console/bundles/com.day.cq.cq-widgets
- Download the bundle JAR (com.adobe.granite.ui.commons-5.5.14.jar) inside cq quickstart
- Extract com.adobe.granite.ui.commons-5.5.14.jar & replace the yuicompressor-2.3.6.jar by yuicompressor-2.4.7.jar.
- Open META-INF/MANIFEST.MF and replace yuicompressor-2.3.6.jar by yuicompressor-2.4.7.jar in the Bundle-ClassPath manifest entry.
- Repack the JAR. The knowledgebase article has com.adobe.granite.ui.commons-5.5.14.jar, which already has the latest YUI compressor for your testing.
- Install the attached jar in this article (com.adobe.granite.ui.commons-5.5.14.jar) from felix console at http://<host>:<port>/system/console/bundles/com.day.cq.cq-widgets
- Delete everything under /var/clientlibs/* from crxde light & Save the changes.
- Restart the bundle http://<host>:<port>/system/console/bundles/com.day.cq.cq-widgets.
Download
Note:
Test completely in lower envirnoment to ensure that updated YUI jar does not cause any problems.
Also AEM5.6 GA version contains latest yui 2.4.7 compressor.