I can use a long name when saving a layout for reuse. However when I create a new panel which uses the saved layout, I get the following error:
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'layout' at row 1: INSERT INTO {panels_display} (layout, layout_settings, panel_settings, cache, title, hide_title, title_pane) 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); Array ( [:db_insert_placeholder_0] => flexible:intro_3_columns_2_columns [:db_insert_placeholder_1] => a:0:{} [:db_insert_placeholder_2] => a:0:{} [:db_insert_placeholder_3] => a:0:{} [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => 0 ) in drupal_write_record() (line 6776 in includes/common.inc).
I fixed this by setting the length of the field layout in the table panels_display to 255 instead of 32.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | layout.patch | 356 bytes | Anonymous (not verified) |
Comments
Comment #1
renat commentedSubscribe.
Comment #2
newtoidSubscribing +1
I experienced exactly the same error, that's what alpha versions are for right?
increasing varchar length sorted it
Comment #3
pheraph commentedSame here. Described fix worked.
Comment #4
Anonymous (not verified) commentedattached patch increases the column length from 32 --> 128.
there don't seem to be any update functions, so i didn't write one, but i'm happy to do that if it will help this land.
Comment #5
nicholasthompsonThis is present in D6 too... #1239312: If Layout name >32 characters, saving the panel fails - except in D6 it fails silently.
Comment #6
rowbotony commentedSame Here, thank Merlin for the "Cancel" button! Nothing is seriously broken on my site though, no worries.
Comment #7
merlinofchaos commentedThis has been fixed and is in as panels update 7300.