3 Replies Latest reply on Mar 15, 2013 5:03 PM by Sham HC

    CQ5.5 Embedded Javascript not minifying

    Tim Goodman Level 1

      Hi

       

      Have applied javascript minify on my publish server with the following results:

      • Any scripts which are in a standard client lib folder are minified
      • Any scripts which are merged in a client lib (using the embed property) are not minified

      e.g.
      Minified:
      http://server:4503/apps/myapp/components/content/component/clientlibs.js

      Not minified (even though this is just embedding the class above):
      http://server:4503/etc/designs/myapp/clientlibs_component.js

       

      I am using CQ5.5 with no Service Pack applied.  Is this the expected results?

       

      Thanks

        • 1. Re: CQ5.5 Embedded Javascript not minifying
          Sham HC Level 7

          Hi Tim,

           

          I am not clear on exact issue. Is clientlibs_component.js followed the clienlib implementation[1] & adding into page using cq:includeClientLib ?

           

          http://experiencedelivers.adobe.com/cemblog/en/experiencedelivers/2012/12/clientlibs-expla ined-by-example.html

           

          Thanks,

          Sham

          • 2. Re: CQ5.5 Embedded Javascript not minifying
            Tim Goodman Level 1

            Yes, that is exactly how it has been implemented

             

            I am looking at the error.log - I can see it is recorded some js as being minified, but these ones are not e.g.

             

            this one has "(minified"

             

            14.03.2013 10:28:23.861 *INFO* [0:0:0:0:0:0:0:1%0 [1363217301117] GET /etc/designs/geometrixx-outdoors/clientlibs_desktop_v1.min.js HTTP/1.1] com.day.cq.widget.impl.HtmlLibraryManagerImpl Start building JS library: /etc/designs/geometrixx-outdoors/clientlibs_desktop_v1 (minified)

            14.03.2013 10:28:25.930 *INFO* [0:0:0:0:0:0:0:1%0 [1363217301117] GET /etc/designs/geometrixx-outdoors/clientlibs_desktop_v1.min.js HTTP/1.1] com.day.cq.widget.impl.HtmlLibraryManagerImpl finished building library /etc/designs/geometrixx-outdoors/clientlibs_desktop_v1.js

             

            This one doesn't

             

            14.03.2013 10:28:42.792 *INFO* [0:0:0:0:0:0:0:1%0 [1363217322780] GET /etc/designs/myapp/clientlibs_login.js HTTP/1.1] com.day.cq.widget.impl.HtmlLibraryManagerImpl Start building JS library: /etc/designs/myapp/clientlibs_login

            14.03.2013 10:28:42.798 *INFO* [0:0:0:0:0:0:0:1%0 [1363217322780] GET /etc/designs/myapp/clientlibs_login.js HTTP/1.1] com.day.cq.widget.impl.HtmlLibraryManagerImpl finished building library /etc/designs/myapp/clientlibs_login.js

             

            Is there any more logging I can get from the HTML Library Manager.  Is there a reason why it's not being minified?

            • 3. Re: CQ5.5 Embedded Javascript not minifying
              Sham HC Level 7

              Hi Tim,

               

                 There is no much additional debug log written into HtmlLibraryManager. Enabling might not help. I tried to reproduce the issue & work fine under "/etc/design".   Are you using dispatcher? If so please clear cache. Try with below steps

                   

              * Clean everything below /var/clientlibs

              * From http://<host>:<port>/system/console/configMgr/com.day.cq.widget.impl.HtmlLibraryManagerImpl Delete the configuration

              * Refresh the page http://<host>:<port>/system/console/configMgr and again updated the newly created configuration to minify & /etc is included in library path.

              * After that stop and start the bundle http://<host>:<port>/system/console/bundles/com.day.cq.cq-widgets

              * Access the page directly from cq rather than through dispatcher.

               

               

              Thanks,

              Sham