Cq ui clientlib is not accessible | Community
Skip to main content
yaraslaud208334
New Participant
October 16, 2015
Solved

Cq ui clientlib is not accessible

  • October 16, 2015
  • 8 replies
  • 4696 views

I have util page that used in publish enviromets. HtmlLibraryManager is used to include  ui

<% HtmlLibraryManager htmlMgr = sling.getService(HtmlLibraryManager.class); if (htmlMgr != null) { htmlMgr.writeCssInclude(slingRequest, out, "cq.wcm.edit"); htmlMgr.writeJsInclude(slingRequest, out, "cq.wcm.edit"); } %>

But some requested libs doesn't loaded

/libs/cq/ui/widgets.js

 and 

/libs/cq/ui/rte.js

They brokes my page.

Also if I will try to acces them http://servername:port/libs/cq/ui/widgets.js , error is returned:

The requested file cannot be found.

How could I get access to this clientlibs?

AEM 6.0 is used.

I have found follwing error in log file: 

 

23.09.2015 11:03:55.124 *ERROR* [172.18.251.90 [1443020634874] GET /libs/cq/ui/widgets.js HTTP/1.1] com.day.cq.widget.impl.HtmlLibraryManagerImpl Error while saving changes: javax.jcr.RepositoryException: Error during assembly of /libs/c q/ui/widgets.js. reverting. 23.09.2015 11:03:55.124 *ERROR* [172.18.251.90 [1443020634874] GET /libs/cq/ui/widgets.js HTTP/1.1] com.day.cq.widget.impl.HtmlLibraryManagerImpl Error while sending cached library: javax.jcr.RepositoryException: Error during assembly of /libs/cq/ui/widgets.js 23.09.2015 11:03:55.125 *ERROR* [172.18.251.90 [1443020634874] GET /libs/cq/ui/widgets.js HTTP/1.1] com.day.cq.widget.impl.HtmlLibraryServlet Cannot create library for /libs/cq/ui/widgets.js java.io.IOException: Error while sending cached library: javax.jcr.RepositoryException: Error during assembly of /libs/cq/ui/widgets.js
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 smacdonald2008

Looks like some libs are missing the AEM JCR.  Did someone modify content under libs which would have moved lib files? 

8 replies

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015

Looks like some libs are missing the AEM JCR.  Did someone modify content under libs which would have moved lib files? 

Feike_Visser1
Employee
October 16, 2015

In publish (for a non logged-in user) the /apps /libs are restricted.

Lokesh_Shivalingaiah
New Participant
October 16, 2015

Usually, in the publish environments, you would have denied access to /libs folder and hence cannot access them directly. Instead embed those clientlibs 'cq.rte' and 'cq.widget' in your clientlibs folder using the property 'embed'

Check [1] here for a reference

[1]  /etc/designs/geometrixx/clientlibs_jquery

yaraslaud208334
New Participant
October 16, 2015

You was right. I have installed package with /libs/cq/ui/ content from author and it's ok now. Thanks

Lokesh_Shivalingaiah
New Participant
October 16, 2015

It should have been already existing when you start AEM Publish instance. If you had install the package again, then there is some issue with the publish instance and you might have to take a look at it!

yaraslaud208334
New Participant
October 16, 2015

Libs were on publish, but something was corrupted or similar. I just reinstalled it

Lokesh_Shivalingaiah
New Participant
October 16, 2015

yea.. but ideally it shouldnt be reinstalled :)

federicos727792
New Participant
October 16, 2015

I'm facing a similar issue on the publisher, but only /libs/cq/ui/rte.js fails, while other "files" in that same directory work ok. See attached.

Also when logged in /libs/cq/ui/rte.js works as expected. Any idea why that might be happening?

Thanks.

UPDATE: I've fixed it by adding 2 access control rules in the publisher in /libs

everyone    rep:glob=*/rte/*
everyone    rep:glob=*/rte

... much like the existing widgets rules. Is this the right thing to do?

After fixing other stuff (serving other needed things from /etc/design) I noticed that I think I really don't mind about rte.js failing. Perhaps this is actually a known thing and the rte is intended to be used only from the author?