Page head contains client library reference to /libs/wcm/foundation/components/page/responsive

Avatar

Avatar
Level 1
zeevd
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
zeevd
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
zeevd
Level 1

28-08-2020

Hi everyone, 

 

First time poster here. I would greatly appreciate your input.

I have a client library reference which appears on several of my site's pages:

 

<html>
    <head>
        ...
        <link rel="stylesheet" href="/libs/wcm/foundation/components/page/responsive.css" type="text/css">
        ...
    </head>
    ...
</html>

 

The call to responsive.css is being blocked by the dispatcher because, per Adobe documentation, it is apparently bad practice to expose /libs/*

 

Going down the rabbit hole of page -> template -> template type -> component has led me to:

/libs/wcm/foundation/components/page/author.html line 22:

<sly data-sly-test="${wcmInit.templateCategories.length > 0}" data-sly-call="${clientLib.css @ categories=wcmInit.templateCategories}" />

It seems that templateCategories is non-zero, invoking a call to clientLib.css which eventually places the aforementioned reference on the page head.

 

My issue is not that responsive.css (category: wcm.foundation.components.page.responsive) is on the page, it is that the client library is not being proxied through /etc.clientlibs and is therefore inaccessible via the dispatcher.

 

Can anyone please point me in the right direction? This issue only appears on some environments, suggesting it is configuration-related.

 

Thanks in advance!

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Theo_Pendle
MVP

Likes

238 likes

Total Posts

251 posts

Correct reply

105 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile

Avatar
Validate 1
MVP
Theo_Pendle
MVP

Likes

238 likes

Total Posts

251 posts

Correct reply

105 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile
Theo_Pendle
MVP

29-08-2020

Hi @zeevd,

As @Shashi_Mulugu suggested, this clientlib is meant for authoring purposes and if authors are accessing AEM via Dispatcher then your Dispatcher should allow all paths (or you will have many other problems too).

However, if you wish to expose a clientlib under /libs in a Publisher witha  Dispatcher that prevents access to /libs, then the clientlib must have allowProxy="{Boolean}true" set on it. This will cause AEM to fetch it under /etc.clientlibs rather than /libs 🙂

Answers (1)

Answers (1)

Avatar

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

232 likes

Total Posts

294 posts

Correct reply

67 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

232 likes

Total Posts

294 posts

Correct reply

67 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile
Shashi_Mulugu
MVP

29-08-2020

@zeevd Thank you for posting your query in Communities. Can you please confirm if the AEM instance you are seeing this issue is in Author or Publisher?

 

In general via template, author.html file will be included in author side to support editing capabilities and this file should not be loaded on publisher. 

 

So if author, make sure you have to allow everything via dispatcher including/libs/..

 

If in publishers, make sure you not include author.html.