Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Undefined Javascript Errors when Creating a Page Template

Avatar

Level 1

I am not able to create page templates on a fresh install of AEM 6.5. I create the page and go to the Structure section to build the page structure. Nothing loads in the component panel or on the page structure and there are 2 errors in the console.

contexthub:442 Uncaught TypeError: Cannot read property 'externalize' of undefined

structure.html:95 Uncaught TypeError: window.injectContextHubUI is not a function

 

I've also ran into this type of error saying Handlebars can't be found. Any idea what is going on here? This is a fresh install of the AEM jar file, locally.  

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
8 Replies

Avatar

Community Advisor

Hi @grantclevyr  How are you creating page template. Are you selecting from existing template type which is page-content and creating a custom page template? Are you able to create page using existing OOB page template that comes along with your archetype deployment?

 

Regards

Avatar

Level 1
Here are the steps I'm taking to create a page template. I am just trying to follow the WKND tutorial, I am very new to AEM so please forgive my ignorance.

Avatar

Level 1
I navigate to Templates for WKND project (http://localhost:4502/libs/wcm/core/content/sites/templates.html/conf/wknd) Then, I click Create and go to Create view For the Page Template Type, I select "Page - Generic template for empty pages of My Site" as the template. Set the page template title and click Create - the browser then redirects to the Structure page. Please see this image link for a screenshot of what I see in the browser. https://i.imgur.com/6d51urm.png

Avatar

Community Advisor

Are you using contexthub?
If you don't then you can remove the reference of contexthub from clientlibs in your page component and then retry?



Arun Patidar

Avatar

Level 1
I am very new to AEM and am trying to follow the WKND tutorial. It looks like the contexthub is the content api? I think I do need that to create a template structure. Is that correct? If not, where can one edit the page component? Thank you so much for your help.

Avatar

Correct answer by
Community Advisor

Avatar

Level 6

@grantclevyr : Just check your template structure in the conf if you are creating the page from your own custom template and template type then There might be some issue in the structure. If you have created custom template then You can refer the below link to cross check your template type and template whether you have created correctly or not.

 

Step-by-step guide to create dynamic template and type.

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/create-a-new-custom-templa... 

 

Thank You. 

Keshav