Undefined Javascript Errors when Creating a Page Template | Community
Skip to main content
July 7, 2021
Solved

Undefined Javascript Errors when Creating a Page Template

  • July 7, 2021
  • 5 replies
  • 3206 views

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.  

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

5 replies

RajaShankar
Community Advisor
Community Advisor
July 7, 2021

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

July 7, 2021
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.
arunpatidar
Community Advisor
Community Advisor
July 7, 2021

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
July 7, 2021
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.
Bhuwan_B
Community Advisor
Bhuwan_BCommunity AdvisorAccepted solution
Community Advisor
July 8, 2021
kchaurasiya
Level 5
July 8, 2021

@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-template-type-and-template-step-by-step-in/m-p/412520#M29202 

 

Thank You. 

Keshav

Dipti_Chauhan
Community Advisor
Community Advisor
July 8, 2021

Please see if this helps : https://github.com/adobe/aem-project-archetype/issues/107

 

Thanks

Dipti