Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Experience Fragment - getChildren of null

robinsonm
Level 3
Level 3

When creating a new Experience Fragment template, then creating a new XF using that new template, I am seeing the following error in the logs:

Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getChildren" of null (/libs/cq/experience-fragments/components/xfpage/body.js#27)

at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3951)

at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3929)

at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3962)

at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3981)

at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3998)

at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2414)

at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2407)

at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:83)

at org.mozilla.javascript.gen._libs_cq_experience_fragments_components_xfpage_body_js_115._c_anonymous_1(/libs/cq/experience-fragments/components/xfpage/body.js:27)

at org.mozilla.javascript.gen._libs_cq_experience_fragments_components_xfpage_body_js_115.call(/libs/cq/experience-fragments/components/xfpage/body.js)

at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)

at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)

at org.mozilla.javascript.gen._libs_cq_experience_fragments_components_xfpage_body_js_115.call(/libs/cq/experience-fragments/components/xfpage/body.js)

at org.apache.sling.scripting.sightly.js.impl.rhino.JsUtils.callFn(JsUtils.java:37)

at org.apache.sling.scripting.sightly.js.impl.use.UseFunction$2.run(UseFunction.java:99)

at org.apache.sling.scripting.sightly.js.impl.loop.Task.run(Task.java:36)

at org.apache.sling.scripting.sightly.js.impl.loop.EventLoop.run(EventLoop.java:61)

... 185 common frames omitted

Looking to see if anyone else has seen this issue.

3 Replies
JeroenDruwe
Level 1
Level 1

I have the same issue, did you find a solution?

JeroenDruwe
Level 1
Level 1
Found it, you should verify if there is a jcr:content node under the initial node of your template
mrobinson
Level 2
Level 2
Yes, you're right. That was the solution we came up with as well.