Closed chicago60614 closed 6 years ago
@chicago60614 I haven't used these versions yet but I think the Groovy Console uses PageManager
internally when you call getPage
. If it's returning null
, it's probably due to the structure of your content. I'd start by checking if the /content
node exists and if it is an actual Page. What's its jcr:primaryType
?
/content
is a sling:OrderedFolder
node, not a page, so that is why the getPage
method is returning null. You can use the getNode
method, however, and call recurse()
on the node instead.
I am in the process of updating the sample scripts - most of them depended on Geometrixx.
See release 11.3.0
with updated sample scripts.
I just installed the Groovy 11.0 package to my local instance of AEM 6.3. Most of the sample scripts don't work. Scripts that worked on my existing CQ 5.5 / Groovy 3 instances don't work in AEM6.3/Groovy11.0.
getPage should work but does not.
Any suggestions?
getPage("/content").recurse { page -> }
java.lang.NullPointerException: Cannot invoke method recurse() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)