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
Solved! Go to Solution.
Views
Replies
Total Likes
Looks like some libs are missing the AEM JCR. Did someone modify content under libs which would have moved lib files?
Views
Replies
Total Likes
Looks like some libs are missing the AEM JCR. Did someone modify content under libs which would have moved lib files?
Views
Replies
Total Likes
In publish (for a non logged-in user) the /apps /libs are restricted.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
You was right. I have installed package with /libs/cq/ui/ content from author and it's ok now. Thanks
Views
Replies
Total Likes
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!
Views
Replies
Total Likes
Libs were on publish, but something was corrupted or similar. I just reinstalled it
Views
Replies
Total Likes
yea.. but ideally it shouldnt be reinstalled :)
Views
Replies
Total Likes
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?
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies