I am not able to use the Umbraco.ColorPicker property editor in Umbraco v8.15.2. When I try to add a new color to the list, a JavaScript exception is thrown: TypeError: elem.spectrum is not a function at setColorPicker.... The color picker is not displayed and the color code cannot be changed. As a result, I can only add the default black #000000 color to the list. The issue seems to be unrelated to the browser.
As you suggested, I tried to remove the content of the App_Plugins folder, custom sections, dashboards, etc. Finally, I found the issue. It was caused by the inclusion of JavaScript files in the Scripts folder (jQuery, Bootstrap...), scripts loaded by Umbraco along the libraries included with the CMS. Once I removed these files, the colorPicker started working correctly. Thanks for your help!
Umbraco 8 Color Picker issue
I am not able to use the
Umbraco.ColorPicker
property editor in Umbraco v8.15.2. When I try to add a new color to the list, a JavaScript exception is thrown:TypeError: elem.spectrum is not a function at setColorPicker...
. The color picker is not displayed and the color code cannot be changed. As a result, I can only add the default black#000000
color to the list. The issue seems to be unrelated to the browser.Hi Michele
Umbraco use the Spectrum color picker plugin. Originally https://bgrins.github.io/spectrum/ but now a newer version https://seballot.github.io/spectrum/ forked from the original project.
Do you use any other packages, which are including spectrum color plugin, which may collide with the Umbraco core color picker.
Hi Bjarne, No, I'm working on a clean installation of Umbraco, without any external packages.
It sounds like Spectrum assets isn't loaded although it should be here: https://github.com/umbraco/Umbraco-CMS/blob/82cf0e30a5ffb1052e5198cbec12f161cf78590a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbcolorpicker.directive.js#L157
I am currently working on some projects based on v8.15 but haven't noticed this issue.
I just tried installing a clean Umbraco v8.15.2 with default starterkit.
But I can't really reproduce the issue.
Do you have any custom stuff like dashboard, property editor, etc in App_Plugins folder?
As you suggested, I tried to remove the content of the
App_Plugins
folder, custom sections, dashboards, etc. Finally, I found the issue. It was caused by the inclusion of JavaScript files in theScripts
folder (jQuery, Bootstrap...), scripts loaded by Umbraco along the libraries included with the CMS. Once I removed these files, thecolorPicker
started working correctly. Thanks for your help!is working on a reply...