I've just installed the package on Umbraco 4.0.3 and at first everything seemed fine. But when I try to change the color and save it, it defaults back to white.
You can select a color and it displays the new choosen color, but when you press either save or save and publish, it reverts back.
I've had this issue when the colorpicker isn't on the first "Tab" with properties (I tried to move it to a second tab and it broke, moved it back again and poof, it worked again.
Just found out what the problem is, although I don't have a clue what is happening and why.
The Color Picker (js) puts the selected value with the onchange event in an hidden field. This hidden field is an ASP.NET Hidden Field and it's value is being read in the OnLoad event (when a postback occurs).
But in 4.0.3 the value is null. When reading the value in the OnPreRender event, the value is filled and correct.
Because for some reason the hidden field's value is empty during OnLoad, I read it's value on the getter of the 'value' object, which does work:
public object value { get { if (IsPostBack && !string.IsNullOrEmpty(hfColor.Value) && string.IsNullOrEmpty(UmbracoValue)) return hfColor.Value; return UmbracoValue; } set { UmbracoValue = value.ToString(); } }
When saving a new color - color is not saved
Hey
I've just installed the package on Umbraco 4.0.3 and at first everything seemed fine. But when I try to change the color and save it, it defaults back to white.
You can select a color and it displays the new choosen color, but when you press either save or save and publish, it reverts back.
Is this a unknown issue?
Sorry - I meant "Is this a known issue"...
I've had this issue when the colorpicker isn't on the first "Tab" with properties (I tried to move it to a second tab and it broke, moved it back again and poof, it worked again.
Hmm I will take a look at this, first need to install a clean 4.0.3 version.
Can't promise it will happen today, but it will happen soon :) Thanks for reporting.
I've tried adding this to a doc type that only has one tab (properties) and its still unable to save the choosen color.
Just found out what the problem is, although I don't have a clue what is happening and why.
The Color Picker (js) puts the selected value with the onchange event in an hidden field.
This hidden field is an ASP.NET Hidden Field and it's value is being read in the OnLoad event (when a postback occurs).
But in 4.0.3 the value is null. When reading the value in the OnPreRender event, the value is filled and correct.
Does anyone know what is happening here?
Solved this issue with a dirty fix...
Because for some reason the hidden field's value is empty during OnLoad, I read it's value on the getter of the 'value' object, which does work:
is working on a reply...