I created a custom content type (CTools plugin) to use as a pane in Panels. I can add and configure the pane, and update the panel variant without a problem. When I try to save the page however, I get the PDOException below.
Apparently, the 'type' I'm trying to save to the db is 'too long', but I'm not sure where or how to change/set this for my content type. Any idea on how to get around this?
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'type' at row 1: INSERT INTO {panels_pane} (did, panel, type, subtype, shown, access, configuration, cache, style, css, extras, position) 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); Array ( [:db_insert_placeholder_0] => 3 [:db_insert_placeholder_1] => middle [:db_insert_placeholder_2] => my_custom_node_title_content_type [:db_insert_placeholder_3] => my_custom_node_title_content_type [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => a:0:{} [:db_insert_placeholder_6] => a:4:{s:4:"link";i:1;s:7:"context";s:25:"argument_entity_id:node_1";s:14:"override_title";i:0;s:19:"override_title_text";s:0:"";} [:db_insert_placeholder_7] => a:0:{} [:db_insert_placeholder_8] => a:1:{s:8:"settings";N;} [:db_insert_placeholder_9] => a:0:{} [:db_insert_placeholder_10] => a:0:{} [:db_insert_placeholder_11] => 0 ) in drupal_write_record() (line 6884 of /docroot/www/includes/common.inc).
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedI think a recent version of Panels made that field bigger; but that's from the machine name of the custom type. If you make the machine name shorter this will go away, and will serve as a workaround to get you going immediately.
Comment #2
brunodboGreat, that worked, thanks.
Comment #4
aaron.r.carlton CreditAttribution: aaron.r.carlton commentedI can confirm that the limit is still at 32 characters. Per IRC, if merlinofchaos suggests at least adding some warning or validation if we don't push through the column change.
Comment #5
GDrupal CreditAttribution: GDrupal commentedI'm in a project that use ctools content types massively for very specific tasks. I have been dealing with this issue a lot since is difficult to choose a good representative name with a few characters.
Comment #6
zuernBernhard CreditAttribution: zuernBernhard at UEBERBIT GmbH commentedComment #7
MustangGB CreditAttribution: MustangGB commented