Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Component JavaScript included in ClientLib on Author instance, but not on Publisher instance

AEMing
Level 3
Level 3

I'm experiencing a weird issue where my component's JavaScript is included in ClientLib on the Author instance, but not on the Publisher instance. I have the following:

/apps/myproject/components/content/mycomponent/clientlib/.content.xml

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
        xmlns:cq="http://www.day.com/jcr/cq/1.0"
        xmlns:jcr="http://www.jcp.org/jcr/1.0"
        jcr:primaryType="cq:ClientLibraryFolder"
/>

/apps/myproject/components/content/mycomponent/clientlib/js.txt

#base=.
myjavascript.js

/apps/myproject/components/content/mycomponent/clientlib/myjavascript.js

console.log('testing');

On the Author instance I get 'testing' in the console, but it does not appear on the Publisher. I even tried logging in as admin on the Publisher instance to rule out any permission issue, but still nothing is written to the console. Scripts located in /etc/designs/myproject/clientlib/js are included in ClientLib, so only scripts included in a component folder aren't included in ClientLib on the Publisher.

What is going on? 😮

0 Replies
veerareddyc2547
Level 3
Level 3

Hi,

do not create Clientlibs folder in /apps folder ,the css and js will effect in Author instance ,but it is not effect in publish Instance.