I'm using the Color Picker all over the site I am working on. Recently, I updated from 7.3.1 to 7.7.5 and some of the colors stopped working. Specifically, some colors seem to be interpreted and returned as numbers in scientific notation.
For example, 949e16 is one of the colors. When I try to retrieve it using someContent.GetPropertyValue<string>("color") I get 9.49E+18.
I've tried re-adding that prevalue to the data type. I've tried republishing all the content that uses the color picker. I've changed the values to other colors and they work fine, but any hex code that resembles a number is converted when I retrieve the value.
Color Picker returning numbers
I'm using the Color Picker all over the site I am working on. Recently, I updated from 7.3.1 to 7.7.5 and some of the colors stopped working. Specifically, some colors seem to be interpreted and returned as numbers in scientific notation.
For example,
949e16
is one of the colors. When I try to retrieve it usingsomeContent.GetPropertyValue<string>("color")
I get9.49E+18
.I've tried re-adding that prevalue to the data type. I've tried republishing all the content that uses the color picker. I've changed the values to other colors and they work fine, but any hex code that resembles a number is converted when I retrieve the value.
Any help is appreciated.
Hey Andrew
Just tried, but can't seem to reproduce it.
As a last resort, could you check if the "Property editor alias" of your datatype is set to "Umbraco.ColorPickerAlias"
It is
Umbraco.ColorPickerAlias
.I believe I figured out a workaround. I created a custom property value converter that does essentially nothing but is for the color picker.
For now, this works, but I'm open to better solutions.
Did you have CorePropertyValueConverters installed before the upgrade? If so, uninstall it
No. Never installed it.
Last thing I can imagine that has gone wrong is some of the dll files were not copied properly during the upgrade.
If you installed trough nuget, copy all files from packages\UmbracoCms.Core.7.7.5\lib\net45 into your bin folder
else copy from the zip you got
is working on a reply...