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.

CommentFileSizeAuthor
#4 layout.patch356 bytesAnonymous (not verified)

Comments

renat’s picture

Subscribe.

newtoid’s picture

Subscribing +1

I experienced exactly the same error, that's what alpha versions are for right?

increasing varchar length sorted it

pheraph’s picture

Same here. Described fix worked.

Anonymous’s picture

Version: 7.x-3.0-alpha3 » 7.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new356 bytes

attached 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.

nicholasthompson’s picture

This is present in D6 too... #1239312: If Layout name >32 characters, saving the panel fails - except in D6 it fails silently.

rowbotony’s picture

Same Here, thank Merlin for the "Cancel" button! Nothing is seriously broken on my site though, no worries.

Status message The page has been updated and saved.
Error messagePDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'layout' at row 1: UPDATE {panels_display} SET layout=:db_update_placeholder_0, layout_settings=:db_update_placeholder_1, panel_settings=:db_update_placeholder_2, cache=:db_update_placeholder_3, title=:db_update_placeholder_4, hide_title=:db_update_placeholder_5, title_pane=:db_update_placeholder_6 WHERE (did = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => flexible:contractor_branding_panel_2 [:db_update_placeholder_1] => a:0:{} [:db_update_placeholder_2] => a:5:{s:14:"style_settings";a:6:{s:7:"default";N;s:6:"middle";a:1:{s:9:"tabs_type";s:15:"horizontal_tabs";}s:4:"left";a:1:{s:9:"tabs_type";s:15:"horizontal_tabs";}s:5:"right";N;s:4:"form";a:1:{s:9:"tabs_type";s:15:"horizontal_tabs";}s:6:"center";N;}s:6:"middle";a:1:{s:5:"style";s:4:"tabs";}s:5:"right";a:1:{s:5:"style";s:2:"-1";}s:4:"left";a:1:{s:5:"style";s:4:"tabs";}s:4:"form";a:1:{s:5:"style";s:4:"tabs";}} [:db_update_placeholder_3] => a:0:{} [:db_update_placeholder_4] => Contractor Branding [:db_update_placeholder_5] => 0 [:db_update_placeholder_6] => 177 [:db_condition_placeholder_0] => 23 ) in drupal_write_record() (line 6868 of /var/www/htdocs-braeburn/includes/common.inc).
merlinofchaos’s picture

Status: Needs review » Fixed

This has been fixed and is in as panels update 7300.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.