Hello,
on our project we use feeds_scald to import multiple scald atoms in a drupal instance. We had problems with some of the items that were imported with title with length between 128 and 255 caracters.
In the schema definition of an atom the title is defined like this :
'title' => array(
'description' => 'The title of this Scald Atom.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
but in the atom add/edit form the title field if defined like this :
$form['atom' . $delta]['title'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
'#required' => TRUE,
'#default_value' => $atom->title,
'#parents' => array('atom' . $delta, 'title'),
'#weight' => -10,
);
No maxlength is defined meaning the length is set by the core defaults which is 128 resulting in improper validation errors (feeds_scald also needs a proper length check but I'll open a proper issue on this module too).
Comments
Comment #1
nicoloye commentedHere is a fixing patch.
Comment #3
jcisio commentedThe patch looks good. In system_element_info() the textfield element has a default maxlength of 128. Committed and pushed. Thanks!