Skip to main content
New Participant
October 10, 2019

Experience Fragment - getChildren of null

  • October 10, 2019
  • 3 replies
  • 3586 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

New Participant
January 7, 2020
Yes, you're right. That was the solution we came up with as well.
New Participant
January 7, 2020
Found it, you should verify if there is a jcr:content node under the initial node of your template
New Participant
January 7, 2020

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