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

marcvangend’s picture

That'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.

marcvangend’s picture

I 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?)

marcvangend’s picture

Project: Deploy - Content Staging » Universally Unique IDentifier
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: node_deploy.module » Code

Discussed with skwashd in IRC - this belongs in the uuid queue.

mpgeek’s picture

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