Copied to clipboard

Flag this post as spam?

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


  • Alex Brown 129 posts 620 karma points
    Sep 11, 2018 @ 14:38
    Alex Brown
    0

    ColorPicker Not Saving Selected Colour

    Hi All

    I'm experiencing a problem with the ColorPicker. I've got numerous places throughout the site which use a ColorPicker which has a set of predefined colours, and it works fine selecting colours except for one of the document types.

    When I select a colour and save it remains highlighted in the CMS as expected, but when I do a release or update the ClientDependency number the saved value is lost and no colour is picked.

    Here's some screenshots and code.

    Selected colour: enter image description here

    After updating ClientDependency: enter image description here

    uSync file for that document type:

    <?xml version="1.0" encoding="utf-8"?>
    <DocumentType>
      <Info>
        <Key>c10cd925-26d6-416f-9c2a-ee0124bdcc31</Key>
        <Name>Policy</Name>
        <Alias>policy</Alias>
        <Icon>icon-script color-cyan</Icon>
        <Thumbnail>folder.png</Thumbnail>
        <Description>Create a new policy</Description>
        <AllowAtRoot>False</AllowAtRoot>
        <IsListView>False</IsListView>
        <Folder>Policies</Folder>
        <Compositions>
          <Composition Key="16e220a4-86f7-4079-b220-9263d35ca387">wheelTemplate</Composition>
        </Compositions>
        <DefaultTemplate>Policy</DefaultTemplate>
        <AllowedTemplates>
          <Template>Policy</Template>
        </AllowedTemplates>
      </Info>
      <Structure />
      <GenericProperties>
        <GenericProperty>
          <Key>890e97c7-2eaf-4483-82fb-75e7dac06a0f</Key>
          <Name>Wheel Background Colour</Name>
          <Alias>wheelBackgroundColour</Alias>
          <Definition>104d29cc-8f7c-4a5f-a12b-e48ddc30e5c7</Definition>
          <Type>Umbraco.ColorPickerAlias</Type>
          <Mandatory>true</Mandatory>
          <Validation></Validation>
          <Description><![CDATA[Select a wheel background colour]]></Description>
          <SortOrder>5</SortOrder>
          <Tab>Content</Tab>
        </GenericProperty>
      </GenericProperties>
      <Tabs>
        <Tab>
          <Caption>Content</Caption>
          <SortOrder>0</SortOrder>
        </Tab>
      </Tabs>
    </DocumentType>
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies