Highlighted

HTML Library Manager - Allowed client libs path

Avatar

Avatar

Akash_Ramchanda

Avatar

Akash_Ramchanda

Akash_Ramchanda

02-01-2019

Hi All,

I have a doubt on 'allowed client libs path' configuration of HTML library manager available in OSGI configs. By default this configuration supports few values like /apps, /etc, /libs. I understand that any client libs that i wish to add should be added only under these paths.

I have been playing around with this configuration and tried couple of scenario's.

1. I added /content in this configuration and assumed that i can now add clientlibs under /content path as well. However, the client libs are not loading in my page if i move any clientlibs from /apps to /content path.

2. I removed /apps from this configuration and assumed that any clientlibs available under /apps will stop supporting. This scenario worked fine for me and clientlib stopped working as expected.

Any idea, what am i doing wrong to support client libs under /content path. It might sound little weird, but my intention here is to allow uploading of  JS and CSS files in dam.

I am using AEM 6.4.

Replies

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

02-01-2019

Hi,

did you try to create clientLibs inside dam /content/dam?

For me its working

Screenshot 2019-01-02 at 7.56.27 PM.png

Highlighted

Avatar

Avatar

Akash_Ramchanda

Avatar

Akash_Ramchanda

Akash_Ramchanda

02-01-2019

I have just moved one of the working clientlib from /apps folder to /content/dam. The client lib stopped loading in the page.

Does the workflow.js that you shared have a primary type as cq:ClientLibraryFolder? Or is it just a file?

Which version are you working on?

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

02-01-2019

Hi,

workflow.js is a file but for showing you I loaded with debugClientLibs=true query parameter.

you can rather create main clientlibs inside /libs/ and and embed other /content/ clientlibs into /libs/ clientlibs. It should work. I tired like that.

Highlighted

Avatar

Avatar

rampai

Avatar

rampai

rampai

03-01-2019

It is a security risk and not something that's recommended.

Check this. Can we store clientlibs( css and js) in dam.

Also won't creating something in /libs get overridden when installing a service pack or going for an upgrade?