AEM 65 - Touch UI RTE (Rich Text Editor) Dialog Color Picker Plugin - Throwing Handlebars.compile error in XF pages

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

07-01-2021

Hi Team

 

   We are using the Color Picker plugin (Refer )  developed and provided by Sreekanth . The plugin works fine in our pages, but while using the color-picker in the XF pages, it is not loading in the RTE and  we are getting Handlebars.compile is not a function issue in the console. Has anyone faced a similar issue ? Any help is appreciated

 

TIA
Veena

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Anudeep_Garnepudi

MVP

Avatar

Anudeep_Garnepudi

MVP

Anudeep_Garnepudi
MVP

08-01-2021

Hi @Veena_Vikram 

Check /etc.clientlibs/clientlibs/granite/handlebars.js loading in your XF page or not.

Answers (2)

Answers (2)

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

08-01-2021

The color-picker doesn't work in Experience Fragment (XF) pages since the Handlebar js is not available there and underscore (clientlibs added as dependency in the picker) doesn't have Handlebar.compile module. I was trying with handlebars as dependency all the time after reading it somewhere, but after some debugging ( thanks to my co-worker) I could figure out that the dependency which had handlebar in AEM is cq.handlebars. 

 

So anybody facing Handlebars.compile is not a function issue in the future, please add cq.handlebars as additional dependency to your clientlibs

 

Thanks

Veena

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883
Arun_Patidar
MVP

07-01-2021