Expand my Community achievements bar.

SOLVED

Clientlib not working - AEM Form Components

Avatar

Level 4

Hi Team

 

I am working on some hide and show logic on form-options-input component. I have written js script in form-options-input.html which is working fine however when I move this script to clientlib it is not working atal.

 

I can see clientlibrary called in edit mode but I want changes to work in preview mode.

 

I have created clientlib with categories as cq.include and under items node added properties sling:resourceType as granite/ui/components/coral/foundation/includeclientlibs and js as cq.include.

 

pras78022281_0-1680614365364.png

My clientlibrary is still not working. Please advise if anything is missing.

 

Thanks

Prashanthi

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You are proabably missing allowproxy property- 

  • allowProxy: If a client library is located under /apps, this property allows acces to it via proxy servlet.

In order for the client libraries under /apps to be accessible, a proxy servelt is used. The ACLs are still enforced on the client library folder, but the servlet allows for the content to be read via /etc.clientlibs/ if the allowProxy property is set to true.

 

Reference: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/cannot-access-clientlib-un...

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

You are proabably missing allowproxy property- 

  • allowProxy: If a client library is located under /apps, this property allows acces to it via proxy servlet.

In order for the client libraries under /apps to be accessible, a proxy servelt is used. The ACLs are still enforced on the client library folder, but the servlet allows for the content to be read via /etc.clientlibs/ if the allowProxy property is set to true.

 

Reference: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/cannot-access-clientlib-un...