Due to the fact that the delta field in the block table is only a 32 varchar field, when I create a widget name over 30 characters I get this error when I try to visit admin/structure/block
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'delta' at row 1: INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => widgets [:db_insert_placeholder_1] => s_socialmedia_profile-footer_buttons [:db_insert_placeholder_2] => racingtheme [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => -1 [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => -1 ) in drupal_write_record() (line 7106 of /Users/Gideon/Sites/d7/httpdocs/includes/common.inc).
This happened when creating a new http://drupal.org/project/socialmedia block.
This small patch seems to fix it.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1885318-widgets-maxlength-2.patch | 1.42 KB | hart0554 |
widgets-maxlength.patch | 1.37 KB | DrupalGideon |
Comments
Comment #1
yanniboi CreditAttribution: yanniboi commentedThis is a great patch and fixes the issue. Please commit :)
Comment #2
hart0554 CreditAttribution: hart0554 at University of Minnesota commentedI tweaked this patch slightly to be able to apply it from the module directory rather than from the drupal root.