clientlib include - does not gets added on page until we hit dumplibs.test.html | Community
Skip to main content
February 19, 2016
Solved

clientlib include - does not gets added on page until we hit dumplibs.test.html

  • February 19, 2016
  • 3 replies
  • 1988 views

Hi all,

 

This is for AEM 6.1 . We are using Sightly. This is related to clientlib

 

We have 2 environments - Dev & Test. On Dev its not working and on Test its working fine.

 

We have created a custom clientLib. The category name for this clientLib is same as the category name for OOB clientLib. All we wanted was where ever the OOB clientLib was included then our custom clientLib should also get included. 

 

In our sightly code we will have include for OOB category

<template data-sly-template.include="${@ categories='Client Library categories', mode='optional: JS or CSS, case-insensitve'}"

    data-sly-use.clientlib="${'libs.granite.sightly.templates.ClientLibUseObject' @ categories=categories, mode=mode}">

${clientlib.include @ context='unsafe'}

</template>

 

And this will add OOB JS & my custom JS both on page.

<script type="text/javascript" src="/etc/clientlibs/granite/jquery/granite.js"></script>

<script type="text/javascript" src="/etc/myproject/myclientlib.min.js"></script> 

 

On my TEST environment its working fine and both the JS is getting included.

 

On my DEV environment only OOB JS is getting included.

 

But Now when I try the dumplibs URL 

http://localhost:4502/libs/granite/ui/content/dumplibs.test.html?categories=cq.jquery

 

Then it starts working and I can see my custom JS is getting included.

 

Trying to figure out what can be causing this issue ?

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

For your DEV and Test environment you can use and see if you are still getting this problem.

To disable clientlib mechanism, navigate to felix console yourhost:port/system/console/configMgr

Search for "HTML Library Manager" Check "Debug" and save.

anyways for production you will not be changing the client libs so i think it's not a problem

3 replies

Lokesh_Shivalingaiah
February 19, 2016

Is it consistent across multiple machines ??

February 19, 2016

Yes this is consistent across multiple machine.

 

For example:

Machine # 1 : If you hit the page then JS is not included. When u hit the dumplibs url then JS starts appearing on Machine # 1

Machine # 2 : If you hit the page then JS is not included. Eventhough you had hit dumplibs from Machine # 1 still you have to hit this from Machine # 2 browser too to make it work.

Amit_Kumar
Amit_KumarAccepted solution
February 19, 2016

For your DEV and Test environment you can use and see if you are still getting this problem.

To disable clientlib mechanism, navigate to felix console yourhost:port/system/console/configMgr

Search for "HTML Library Manager" Check "Debug" and save.

anyways for production you will not be changing the client libs so i think it's not a problem