Issue

Find and replace searches performed in the Classic UI Site Admin (/siteadmin) fail under some content paths.  An error similar to the one below is logged in the error.log: 

01.06.2017 11:36:28.122 *ERROR* [0:0:0:0:0:0:0:1 [1496331387272] GET /content/geometrixx/en.find.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable
java.lang.NullPointerException: null
	at com.day.cq.wcm.core.impl.servlets.FindReplaceServlet.findPages(FindReplaceServlet.java:264)
	at com.day.cq.wcm.core.impl.servlets.FindReplaceServlet.doGet(FindReplaceServlet.java:144)
	at com.day.cq.commons.servlets.AbstractPredicateServlet.doGet(AbstractPredicateServlet.java:68)
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:269)
	at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:140)
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:345)

Cause

This can be caused by storing nt: unstructured directly under cq: Page nodes instead of storing them under the jcr: content (cq: PageContent) node of pages.

For example:
Wrong:
/content/geometrixx/en/footer/copyright

Correct:
/content/geometrixx/en/jcr:content/footer/copyright

Resolution

Move the problematic nodes under the jcr: content subnodes of pages instead of storing them directly under the cq: Page node.  Storing content under the cq: PageContent (jcr: content) node structure is the best practice approach.

Šis darbas yra licencijuotas pagal licenciją „Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License“  „Twitter™“ ir „Facebook“ skelbimams „Creative Commons“ sąlygos netaikomos.

Teisiniai pranešimai   |   Privatumo internete politika