Tuesday, January 22, 2013

gotchya! cq:console has problems with vanitypath

The Problem

You are trying to implement a cq:console mixin to a page component to provide a custom admin interface by using the cq:console mixin, and now the welcome screen no longer renders, as you get the following error:

GET /apps/cq/core/content/welcome.html HTTP/1.1] service: Uncaught SlingException An exception occurred processing JSP page /apps/cq/core/components/welcome/welcome.jsp at line 135

The Solution

What is happening here, is that the sling:vanityPath is failing, as the mixin by default specifies a String[], but the underlying Java component expects sling:vanityPath to be a single String.

Delete the sling:vanityPath variable, and recreate it as just a flat String, rather than an arrayed String[].

No comments:

Post a Comment