Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Cq ui clientlib is not accessible

Avatar

Level 3

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
1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

8 Replies

Avatar

Correct answer by
Level 10

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

Avatar

Employee

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

Avatar

Level 10

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

Avatar

Level 3

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

Avatar

Level 10

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!

Avatar

Level 3

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

Avatar

Level 10

yea.. but ideally it shouldnt be reinstalled :)

Avatar

Level 3

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?