Found this while working with viewfield, but it could affect many other things: the length attribute is unset for any type not mapped to varchar. Unfortunately, this includes char (as well as numeric and decimal).

The problem is on lines 1294-1296 and 1391-1393 of content_admin.inc:

      if ($type != 'varchar') {
        unset($attributes['length']);
      }

This will result in a char field always having a length of 1.

I would suggest explicitly removing the length just for the text and integer types, rather than for anything not a varchar.

      if ($type == 'text' || $type == 'integer') {
        unset($attributes['length']);
      }
CommentFileSizeAuthor
#2 146568.patch1.08 KBdopry

Comments

stormsweeper’s picture

The issue with Viewfield is here: #146574.

dopry’s picture

Status: Active » Needs review
StatusFileSize
new1.08 KB

try the attached patch...

karens’s picture

Status: Needs review » Closed (won't fix)

We're not making any more changes to D5.