Hi, I got this error message when I click save to add a new newsletter category.
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'from_name' at row 1: INSERT INTO {simplenews_category} (tid, format, priority, receipt, from_name, from_address, email_subject, hyperlinks, new_account, opt_inout, block) 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, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10); Array ( [:db_insert_placeholder_0] => 84 [:db_insert_placeholder_1] => plain [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => my site name [:db_insert_placeholder_5] => my email address [:db_insert_placeholder_6] => [[simplenews-category:name]] [node:title] [:db_insert_placeholder_7] => 1 [:db_insert_placeholder_8] => none [:db_insert_placeholder_9] => double [:db_insert_placeholder_10] => 1 ) in simplenews_category_save() (line 1903 of sites\all\modules\simplenews\simplenews.module).
Comment | File | Size | Author |
---|---|---|---|
#2 | decrease_maxlength.patch | 864 bytes | Berdir |
Comments
Comment #1
BerdirLooks like your From name is too long, so we either need to increase the field in the database and/or add a max length validation to it.
Comment #2
BerdirThe attached patch adjusts the length of the from_name to that of the database column.
Comment #3
DrupalDan CreditAttribution: DrupalDan commentedHi Berdir,
Thank you for your quick response. Actually the name is pretty concise, something like "Company Corporate Mailing List".
Also, I got another bug all over my site yesterday and it disappeared once I uninstalled the module. Thank you for the patch; I'll reinstall the module and patch it and let you know if there's any problem. Thanks again!
Comment #4
BerdirCommited.