We are using a custom color picker from Experiencing Adobe Experience Manager - Day CQ: AEM 65 - Touch UI RTE (Rich Text Editor) Dialog Colo... - the color picker works fine, but color-picker.js throws this Uncaught TypeError, and that causes an issue with other plugins which load after it. My understanding is that Handlebars is included OOTB in AEM, based on the docs - SCF Handlebars Helpers (although, the 6.5 version of this documentation appears incorrect - helpers.js has moved to /libs/clientlibs/social/commons/scf/helpers.js in 6.5) which makes me think that the issue is due to helpers.js moving. Is there a step that is missing somewhere that I need to make sure Handlebars is included and accessible by this JS file?
解決済! 解決策の投稿を見る。
The error is because the plugin is loading twice with page and in a popover dialog, and in the popover dialog the Handlebar js is not being loaded that causing the issue, in case if you are using custom plugins then add below condition in plugin js to load plugins only once.
if (document.location.pathname.indexOf("/editor.html/") > -1)
addDialogTemplate();
I've updated the color picker and created new custom style plugin and both are working fine in 6.3,6.4 and 6.5
Hi,
the handlebars library is deployed by default if you include the cq.authoring.dialog clientlib into your project (as you can see from the image).
Thanks,
Antonio
The error is because the plugin is loading twice with page and in a popover dialog, and in the popover dialog the Handlebar js is not being loaded that causing the issue, in case if you are using custom plugins then add below condition in plugin js to load plugins only once.
if (document.location.pathname.indexOf("/editor.html/") > -1)
addDialogTemplate();
I've updated the color picker and created new custom style plugin and both are working fine in 6.3,6.4 and 6.5
if (document.location.pathname.indexOf("/editor.html/") > -1) {
addDialogTemplate();
}
yes, it is working for us, we are having a similar issue with RTE Image Picker Plugin.
Thanks
表示
返信
いいね!の合計
表示
返信
いいね!の合計
hi , i have used the same method suggested by you but still getting the error " handlebars.compile is not a function"
表示
返信
いいね!の合計
Hi Arun,
I was not able to fix the same issue by adding the
if (document.location.pathname.indexOf("/editor.html/") > -1)
addDialogTemplate();
Do we need to do something else?@
表示
返信
いいね!の合計
I updated color picker plugin, works with AEM 6.3+
you can get it from below:
AEM - Touch UI - RTE HTML Element Selector, Custom Style Plugin & Color Picker Plugin
if (document.location.pathname.indexOf("/editor.html/") > -1) {
addDialogTemplate();
}
yes, it is working for us, we are having a similar issue with RTE Image Picker Plugin.
表示
返信
いいね!の合計
@arunpatidar yes, I tried that as well.
表示
返信
いいね!の合計
To resolve the Handlebars.js error that you are experiencing, it is recommended that you add cq.tsdk.handlebars as a dependency to the clientlib folder
表示
返信
いいね!の合計