Removing unwanted clientlibs in Publish for experience fragment | Community
Skip to main content
Level 5
July 17, 2020
Solved

Removing unwanted clientlibs in Publish for experience fragment

  • July 17, 2020
  • 2 replies
  • 2759 views

Hello All - I am using experience fragment in AEM 6.5. Below files are not required but they get added in the publish instance even if it is not part of my include clientlib category. This is causing unwanted network calls. In my custom component, it is pointing to sling:resourceSuperType:cq/experience-fragments/components/xfpage. Could someone help with this please?

 

/etc.clientlibs/clientlibs/social/thirdparty/underscore.min.js
/etc.clientlibs/clientlibs/granite/moment.min.js
/etc.clientlibs/clientlibs/social/thirdparty/backbone.min.js
/etc.clientlibs/clientlibs/social/thirdparty/handlebars.min.js
/etc.clientlibs/clientlibs/social/commons/scf.min.css
/etc.clientlibs/clientlibs/social/commons/scf.min.js
/libs/social/integrations/livefyre/components/authorcomponents/shared.min.js
/libs/social/integrations/livefyre/components/authorcomponents/authorclientlibs.min.js
/libs/cq/ui/rte.min.js
/libs/cq/ui/widgets.min.js
/etc.clientlibs/cq/personalization/clientlib/personalization/integrations/commons.min.js
/etc.clientlibs/cq/analytics/clientlibs/sitecatalyst/tracking.min.css
/etc.clientlibs/cq/analytics/clientlibs/sitecatalyst/tracking.min.js
/etc.clientlibs/cq/searchpromote/clientlibs/searchpromote.min.css
/etc.clientlibs/cq/searchpromote/clientlibs/searchpromote.min.js
/libs/cq/searchpromote/widgets.min.js

 

@arunpatidar @kautuk_sahni 

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 BrianKasingli

@v1101 

A simple answer for you is to create your own xfpage page component (typically in /apps/my-app/components/structure/xfpage, overlaying the /libs xfpage page component, and removing the fluff. 

Since you are referencing and using the out of the box xfpage component, the out of the box xfpage component is trying to resolve the clientlib category of "cq.experience-fragments.web", within custom headlibs. Also taking a look at the content.html, another reference to a clientlib category is referenced "cq.experience-fragments.content". As you can see, the page component is trying to resolve multiple unwanted clientlibs. To resolve your issue, you can create your own xfpage page component. 

xfpage path - http://localhost:4502/crx/de/index.jsp#/libs/cq/experience-fragments/components/xfpage

xfpage content.html path - http://localhost:4502/crx/de/index.jsp#/libs/cq/experience-fragments/components/xfpage/content.html

xfpage customheaderlibs.html path -http://localhost:4502/crx/de/index.jsp#/libs/cq/experience-fragments/components/xfpage/customheaderlibs.html

I hope this helps.

2 replies

BrianKasingli
Community Advisor and Adobe Champion
BrianKasingliCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
July 17, 2020

@v1101 

A simple answer for you is to create your own xfpage page component (typically in /apps/my-app/components/structure/xfpage, overlaying the /libs xfpage page component, and removing the fluff. 

Since you are referencing and using the out of the box xfpage component, the out of the box xfpage component is trying to resolve the clientlib category of "cq.experience-fragments.web", within custom headlibs. Also taking a look at the content.html, another reference to a clientlib category is referenced "cq.experience-fragments.content". As you can see, the page component is trying to resolve multiple unwanted clientlibs. To resolve your issue, you can create your own xfpage page component. 

xfpage path - http://localhost:4502/crx/de/index.jsp#/libs/cq/experience-fragments/components/xfpage

xfpage content.html path - http://localhost:4502/crx/de/index.jsp#/libs/cq/experience-fragments/components/xfpage/content.html

xfpage customheaderlibs.html path -http://localhost:4502/crx/de/index.jsp#/libs/cq/experience-fragments/components/xfpage/customheaderlibs.html

I hope this helps.

v1101Author
Level 5
July 17, 2020
@briankasingli - Thanks for your response. I have overlay the component and copied customheaderlibs.html and content.html and also verified using /libs/granite/ui/content/dumplibs.test.html?categories=cq.experience-fragments.web /libs/granite/ui/content/dumplibs.test.html?categories=cq.experience-fragments.content, It looks like it is showing the results only for css. is there any other file that I need to updated for restricting the JS that I have mentioned above.
arunpatidar
Community Advisor
Community Advisor
July 17, 2020

Hi,

Are these js/css are getting added in all of the page? Can you check the dependencies property of of your project clientlibs?

 

Arun Patidar
v1101Author
Level 5
July 17, 2020
Hi Arun - I have verified the dependencies as well and don't see any dependencies related to this categories.