Troubleshooting a Client Library loading Failure

Avatar

Avatar
Validate 1
Level 1
AEMUserFromPlano
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
AEMUserFromPlano
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
AEMUserFromPlano
Level 1

22-03-2020

Hello 

AEM 6.5 --> Browsed couple of places and tutorials. Did not find a way to troubleshoot. So thought of asking that question here. When you have a line that says

<sly data-sly-use.clientLib="/libs/granite/slightly/templates/clientlib.html" data-sly-call="${clientLib.js @ categories='we.train.all'}"/> , I understand the js and css should be in a folder of type cq:ClientLibraryFolder and categories should have we.train.all and this folder can be anywhere, but ideally in /apps/ folder. (I am referring to tutorials that were probably written prior to 6.5 version and that says to put it in /etc/designs/)

 

Question, using developer tools, if the css doesnot get loaded, how do I troubleshoot to figure out, where I have gone wrong

 

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Nirmal_Jose
MVP

Likes

119 likes

Total Posts

207 posts

Correct reply

58 solutions
Top badges earned
Validate 1
Establish
Coach
Contributor
Shape 1
View profile

Avatar
Validate 1
MVP
Nirmal_Jose
MVP

Likes

119 likes

Total Posts

207 posts

Correct reply

58 solutions
Top badges earned
Validate 1
Establish
Coach
Contributor
Shape 1
View profile
Nirmal_Jose
MVP

22-03-2020

You can use dumplibs at [1] to validate your clientlibs. Enter your clientlib category and type and verify the path to which it is resolving into. Then you can invoke the URL directly in the browser with .css or .js extension to see what is being loaded. For example, for clientlib category - core.wcm.components.accordion.v1.editor and type JS, the path it is resolving into is /apps/core/wcm/components/accordion/v1/accordion/clientlibs/editor. If you invoke http://localhost:4502/apps/core/wcm/components/accordion/v1/accordion/clientlibs/editor.js, you can see what is being loaded. Hope this helps.

 

[1] - /libs/granite/ui/content/dumplibs.html

Answers (2)

Answers (2)

Avatar

Avatar
Springboard
Level 2
Amit-Tiwari
Level 2

Likes

10 likes

Total Posts

31 posts

Correct reply

4 solutions
Top badges earned
Springboard
Ignite 3
Ignite 1
Validate 1
Establish
View profile

Avatar
Springboard
Level 2
Amit-Tiwari
Level 2

Likes

10 likes

Total Posts

31 posts

Correct reply

4 solutions
Top badges earned
Springboard
Ignite 3
Ignite 1
Validate 1
Establish
View profile
Amit-Tiwari
Level 2

23-03-2020

@AEMUserFromPlano 

If your client library in apps folder then 
1. check you have js.txt and css.txt and inside them the files are included

2. check have you added the property allow proxy true in order to access them from apps

clientlib.PNG

Avatar

Avatar
Seeker
MVP
Suraj_Kamdi
MVP

Likes

148 likes

Total Posts

164 posts

Correct reply

42 solutions
Top badges earned
Seeker
Bedrock
Engage 1
Springboard
Validate 1
View profile

Avatar
Seeker
MVP
Suraj_Kamdi
MVP

Likes

148 likes

Total Posts

164 posts

Correct reply

42 solutions
Top badges earned
Seeker
Bedrock
Engage 1
Springboard
Validate 1
View profile
Suraj_Kamdi
MVP

22-03-2020

@AEMUserFromPlano 

First, check whether clientlib folder has css.txt and js.txt files.