Highlighted

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

AEMing

02-09-2016

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? 😮

Replies

Highlighted

veerareddyc2547

02-09-2016

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.