Hi, I am using Drupal 6.10 and CCK 6.x-2.1.
I am following the book Drupal 6 Site Builder Solutions by Mark Noble published by Packt. On Page 93 it gives an example of adding a decimal field as follows:
Create Content Type Menu Item - Create a new Field in Menu Item:
1) Name= Price
2) Label = Price
3) Field Type = Decimal
4) Widget Type = Text Field
5) Default Price = 0.00
6) Check Required
7) Number of values = 1
8) Minimum = 0.00
9) Maximum = 50.00
10) Precision = 10
11) Scale = 2
12) Decimal Marker = decimal point
13) Prefix = $
When I hit save I get the error message 'Price cannot be longer than characters but is currently 4 characters long.' There is also a red box around the default field. Further investigation shows that the field actually appears to be created but unfortunately it cannot be set with a minimum value.
BUG WORK AROUND IS AS FOLLOWS
When creating the field leave the default price field empty (I do not get the error message). Create this new field in Menu Item first and then configure a default value afterwards.
I trust this makes sense and I wonder if anyone else has encountered this?
Thanks
Digby
Comments
Comment #1
dig1 commentedI just closed this because time and CCK has moved on. I have not checked if this problem is fixed by by newer CCK versions but it's not important and I want to clear up oustanding tickets.
Comment #2
ongdesign commentedThis issue still exists in both 6.x-3.0-alpha3 and 6.x-2.9 (on fresh installs), and the workaround still works.
Comment #3
nickl commentedDuplicate issue, proposed patch submitted at #308250-9: Problems with max length on numbers please review.