When I attempt to create both articles and basic pages, choosing the following settings:
50 nodes
1 year ago
12 max comments
12 max word length
I get the following error message:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /drupal7/batch?render=overlay&id=5&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'subject' at row 1: INSERT INTO {comment} (nid, pid, uid, subject, hostname, created, changed, status, thread, name, mail, homepage, language) 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, :db_insert_placeholder_11, :db_insert_placeholder_12); Array ( [:db_insert_placeholder_0] => 6 [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => Aptent Elit Luptatum Paratus Pecus Premo Probo Proprius Uxor Valetudo Vulpes Zelus [:db_insert_placeholder_4] => 99.112.4.60 [:db_insert_placeholder_5] => 1294844738 [:db_insert_placeholder_6] => 1294844738 [:db_insert_placeholder_7] => 1 [:db_insert_placeholder_8] => 01/ [:db_insert_placeholder_9] => devel generate [:db_insert_placeholder_10] => devel_generate@example.com [:db_insert_placeholder_11] => [:db_insert_placeholder_12] => und ) in comment_save() (line 1573 of /drupal7/modules/comment/comment.module).
Comment | File | Size | Author |
---|---|---|---|
#2 | devel_1024340.patch | 638 bytes | borgewarvik |
Comments
Comment #1
borgewarvik CreditAttribution: borgewarvik commentedI can confirm this bug. OS X with MAMP setup. Started with minimal installation of D7. Comment module has been enabled.
Comment #2
borgewarvik CreditAttribution: borgewarvik commentedI've located the bug. The comments table column for subject has a max length of 64 characters. When allowing large numbers of words in titles to generate, the subject will exceed this length.
This patch takes the generated title and passing it through substr:
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedcommitted. thx.