Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Experience Fragment - getChildren of null

Avatar

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

Avatar

Level 1

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

Avatar

Level 1
Found it, you should verify if there is a jcr:content node under the initial node of your template

Avatar

Level 2
Yes, you're right. That was the solution we came up with as well.