When you make a field of type List (Numeric), the data is stored in a database field of type unsigned int. This means that negative values can not be saved in this list, for instance to create a classic Drupal weight field from -20 to 20. If you try to save a negative value you get a big fat PDO error.

Patch attached.

CommentFileSizeAuthor
unsigned_numeric_list.patch831 bytesgdd

Comments

gdd’s picture

Status: Active » Needs review
yched’s picture

Status: Needs review » Reviewed & tested by the community

makes sense.

dries’s picture

Project: Drupal core » HEAD to HEAD
Version: 7.x-dev »
Component: field system » Code
Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Moving this to the head2head project.

dries’s picture

Status: Fixed » Active
David_Rothstein’s picture

Project: HEAD to HEAD » Drupal core
Version: » 7.x-dev
Component: Code » field system
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.