Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I try to deploy a node type with a simple field collection without success on my live web site.
I got that on the error logs :
PDOException: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'field_collection_value' at row 1: INSERT INTO {field_data_field_collection} (entity_type, entity_id, revision_id, bundle, delta, language, field_collection_value) 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] => node [:db_insert_placeholder_1] => 3 [:db_insert_placeholder_2] => 3 [:db_insert_placeholder_3] => article [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 10940cf1-a916-41ce-9f0e-55feff098a28 ) in field_sql_storage_field_storage_write() (line 448 of /Users/xadag/Developpement/www/yogarik/drupal-7.16-2/modules/field/modules/field_sql_storage/field_sql_storage.module)
Its seems that it try to insert the uuid in the field field_collection_value witch is an integer.
Any solution about this problem ?
Could'n find anything yet to solve that.
Thanks!
Comments
Comment #1
marcvangendThat's exactly what I'm seeing. This db_insert_placeholder_6 contains the uuid, but looking at the db of the source site, that's not correct. Instead, the field collection id should be inserted there.
Comment #2
marcvangendI tried to find what's causing this, but I haven't figured it all out yet. I did notice something strange in field_collection_field_uuid_presave() in uuid.core.inc. That function calls
entity_property_uuid_to_id($items, 'field_collection_item', 'value');
but when I inspect the $items array after that function call, $items is unchanged and it still contains uuid's.(So does that mean that this issue should be in the UUID module queue?)
Comment #3
marcvangendDiscussed with skwashd in IRC - this belongs in the uuid queue.
Comment #4
mpgeek CreditAttribution: mpgeek commentedAnyone who runs into the issue posted here ought to try out the patch in #1390708: Fix crash with reference to missing entity at comment #10. The UUIDs do not appear in the $items array anymore after using the patch and a deployment works as expected.