April 3, 2020
Estimated Post Reading Time ~

cq:console has problems with vanity path

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] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException org.apache.sling.api.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[].


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.