Experience Fragment - getChildren of null

Avatar

Avatar
Validate 1
Level 3
robinsonm
Level 3

Likes

6 likes

Total Posts

50 posts

Correct reply

3 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
robinsonm
Level 3

Likes

6 likes

Total Posts

50 posts

Correct reply

3 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
robinsonm
Level 3

10-10-2019

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.

Replies

Avatar

Avatar
Give Back 3
Level 1
JeroenDruwe
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Give Back 3
Give Back
View profile

Avatar
Give Back 3
Level 1
JeroenDruwe
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Give Back 3
Give Back
View profile
JeroenDruwe
Level 1

07-01-2020

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

Avatar

Avatar
Give Back 3
Level 1
JeroenDruwe
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Give Back 3
Give Back
View profile

Avatar
Give Back 3
Level 1
JeroenDruwe
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Give Back 3
Give Back
View profile
JeroenDruwe
Level 1

07-01-2020

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

Avatar

Avatar
Validate 1
Level 1
mrobinson
Level 1

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
View profile

Avatar
Validate 1
Level 1
mrobinson
Level 1

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
View profile
mrobinson
Level 1

07-01-2020

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