Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hamish 96 posts 154 karma points
    Jan 29, 2010 @ 06:33
    Hamish
    0

    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?

  • Hamish 96 posts 154 karma points
    Jan 29, 2010 @ 06:35
    Hamish
    0

    Sorry - I meant "Is this a known issue"...

  • Rik Helsen 670 posts 873 karma points
    Jan 29, 2010 @ 09:36
    Rik Helsen
    0

    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.

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Jan 29, 2010 @ 11:20
    Stefan Kip
    0

    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.

  • Hamish 96 posts 154 karma points
    Feb 07, 2010 @ 04:18
    Hamish
    0

    I've tried adding this to a doc type that only has one tab (properties) and its still unable to save the choosen color.

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Mar 01, 2010 @ 23:07
    Stefan Kip
    0

    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?

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Mar 02, 2010 @ 20:29
    Stefan Kip
    0

    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:

    public object value
    {
    get
    {
    if (IsPostBack && !string.IsNullOrEmpty(hfColor.Value) && string.IsNullOrEmpty(UmbracoValue))
    return hfColor.Value;
    return UmbracoValue;
    }
    set
    {
    UmbracoValue = value.ToString();
    }
    }
Please Sign in or register to post replies

Write your reply to:

Draft