Hi I'm getting the following errors with the layout for commerce product view modes
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'view_mode' at row 1: INSERT INTO {ds_layout_settings} (id, entity_type, bundle, view_mode, layout, settings) 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); Array ( [:db_insert_placeholder_0] => commerce_product|kit_bundle_all|commerce_product_FIELDNAME [:db_insert_placeholder_1] => commerce_product [:db_insert_placeholder_2] => kit_bundle_all [:db_insert_placeholder_3] => commerce_product_FIELDNAME [:db_insert_placeholder_4] => ds_1col [:db_insert_placeholder_5] => a:9:{s:7:"regions";a:1:{s:10:"ds_content";a:1:{i:0;s:18:"field_kit_team_ref";}}s:6:"fields";a:1:{s:18:"field__FIELDNAME_ref";s:10:"ds_content";}s:7:"classes";a:0:{}s:8:"wrappers";a:0:{}s:14:"layout_wrapper";s:3:"div";s:17:"layout_attributes";s:0:"";s:23:"layout_attributes_merge";b:1;s:21:"layout_link_attribute";b:0;s:18:"layout_link_custom";s:0:"";} ) in drupal_write_record() (line 7136 of ../includes/common.inc).
stevie
Comments
Comment #1
aspilicious commentedThis still an issue?
Try the dev a,d run update.php.
When does it exactly happen?
Comment #2
aspilicious commentedWe use DS with commerce on a daily basis. Never had troubles. Since you didn't respond I guess your problems are solved?
Comment #3
Ravenight commentedI just ran into this.
It happens when the machine name is too long for the view mode. For example the custom view mode I had was: commerce_product_grid_layout, which results in the name node_commerce_product_grid_layout
When I enabled this on the product display and the commerce product it resulted in the error above. However, I renamed the custom view mode to just "grid" this resulted in the machine name for the commerce product to be "node_grid" which I was able to save without the error.