December 29, 2020
Estimated Post Reading Time ~

AEM Template editor & Experience Fragments

I m trying to create a new template using template editor which includes experience fragments in the header and footer pointing to appropriate experience fragment content.

But in structure mode of the template, I see an error saying "ERROR An error occurred, please check the browser console for more details." And in the browser console, I see the below error

Handler of component is invalid -> TypeError: Cannot read property 'actions' of undefined

at eval (eval at ns.util.sanitizeCQHandler (http://localhost:4502/libs/cq/gui/components/authoring/editors/clientlibs/core.js:6860:23), <anonymous>:1:37)

at Object.ns.util.sanitizeCQHandler (http://localhost:4502/libs/cq/gui/components/authoring/editors/clientlibs/core.js:6860:23)

at Object.<anonymous> (http://localhost:4502/libs/cq/gui/components/authoring/editors/clientlibs/core.js:8625:42)

at Function.each (http://localhost:4502/etc.clientlibs/clientlibs/granite/jquery.js:370:19)

at classDefinition.constructor._loadConfig (http://localhost:4502/libs/cq/gui/components/authoring/editors/clientlibs/core.js:8614:15)

at classDefinition.constructor.updateConfig (http://localhost:4502/libs/cq/gui/components/authoring/editors/clientlibs/core.js:8654:22)

at http://localhost:4502/libs/cq/gui/components/authoring/editors/clientlibs/core.js:28173:26

at Array.forEach (<anonymous>)

at Array.ns.editables.self.add (http://localhost:4502/libs/cq/gui/components/authoring/editors/clientlibs/core.js:28162:23)

at Array.ns.editables.self.set (http://localhost:4502/libs/cq/gui/components/authoring/editors/clientlibs/core.js:28303:18)

(anonymous) @ core.js:20376

I see everything else I wish is working fine i.e content is getting rendered fine in initial content mode, but just that I see this error in the console.

Solution:
This issue can be resolved by embeding the clientlib 'cq.authoring.editor.plugin.experiencefragments' to template editor clientlib @ /libs/cq/gui/components/authoring/editors/clientlibs/sites/template


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.