Clientlib not working - AEM Form Components | Community
Skip to main content
Prashardan
New Participant
April 4, 2023
Solved

Clientlib not working - AEM Form Components

  • April 4, 2023
  • 1 reply
  • 1334 views

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.

 

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

 

Thanks

Prashanthi

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 Sady_Rifat

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-under-custom-quot-apps-granite-core/m-p/567320/highlight/true#M141639

1 reply

Sady_Rifat
Sady_RifatAccepted solution
New Participant
April 5, 2023

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-under-custom-quot-apps-granite-core/m-p/567320/highlight/true#M141639