Closed (fixed)
Project:
Colorpicker
Version:
6.x-2.0-rc3
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
15 Jun 2009 at 08:41 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hlykos commentedI have the same problem, it seems to work properly if you avoid multiple values.
Comment #2
skilip commentedI'll fix this this week
Comment #3
skilip commentedComment #4
eu.claudio commentedsubscribing
Comment #5
thinkyhead commentedthank you! looking forward to the official 2.0 release party
Comment #6
skilip commentedThis patch fixes the validation bug
Comment #7
jrust commentedHmm, I applied the patch, and it does remove the validation error. However, now when I submit a node with an empty colorpicker value it automatically sets it to #FF0000.
Comment #8
skilip commentedIsn't that the default value specified in the Content Fields settings page? Did you try leaving that empty?
Comment #9
jrust commentedYeah, the default value is blank for the content field settings field. Not sure where the FF0000 is coming from.
Comment #10
alan d. commentedIn line 155 & 173 the default value is set if the existing value is not set.
So all existing items will default to NULL (empty string) and the new values to '#FF0000'. [If I'm reading the code correctly.]
Big +1 to not having any defaults in code! It is a pain to set the defaults on all colorpicker fields
The attached patch removes the default value along with the changes to the required / empty values as per the patch above
Comment #11
c960657 commentedAFAIK, CCK takes care of handling the required check.
The problem is that validation should only take place when a non-empty value has been entered. For the Colorpicker widget, the empty value is "#". colorpicker_cck_field() compares the submitted value to "#", but colorpicker_textfield_process() has already replaced the single "#" with "".
Comment #12
thinkyhead commentedApplied the latest patch.