After upgrading my Drupal website from D6 to D7, I regularly get this error message that prevents me from being able to edit existing nodes:

The website encountered an unexpected error. Please try again later.

PDOException : SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'field_galerie_image_vdl_width' at row 1: INSERT INTO {field_data_field_galerie_image_vdl} (entity_type, entity_id, revision_id, bundle, delta, language, field_galerie_image_vdl_fid, field_galerie_image_vdl_alt, field_galerie_image_vdl_title, field_galerie_image_vdl_width, field_galerie_image_vdl_height) 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, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17, :db_insert_placeholder_18, :db_insert_placeholder_19, :db_insert_placeholder_20, :db_insert_placeholder_21), (:db_insert_placeholder_22, :db_insert_placeholder_23, :db_insert_placeholder_24, :db_insert_placeholder_25, :db_insert_placeholder_26, :db_insert_placeholder_27, :db_insert_placeholder_28, :db_insert_placeholder_29, :db_insert_placeholder_30, :db_insert_placeholder_31, :db_insert_placeholder_32), (:db_insert_placeholder_33, :db_insert_placeholder_34, :db_insert_placeholder_35, :db_insert_placeholder_36, :db_insert_placeholder_37, :db_insert_placeholder_38, :db_insert_placeholder_39, :db_insert_placeholder_40, :db_insert_placeholder_41, :db_insert_placeholder_42, :db_insert_placeholder_43); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 97 [:db_insert_placeholder_2] => 98 [:db_insert_placeholder_3] => contenu_sortie_action [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 251 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => [:db_insert_placeholder_11] => node [:db_insert_placeholder_12] => 97 [:db_insert_placeholder_13] => 98 [:db_insert_placeholder_14] => contenu_sortie_action [:db_insert_placeholder_15] => 1 [:db_insert_placeholder_16] => und [:db_insert_placeholder_17] => 252 [:db_insert_placeholder_18] => [:db_insert_placeholder_19] => [:db_insert_placeholder_20] => [:db_insert_placeholder_21] => [:db_insert_placeholder_22] => node [:db_insert_placeholder_23] => 97 [:db_insert_placeholder_24] => 98 [:db_insert_placeholder_25] => contenu_sortie_action [:db_insert_placeholder_26] => 2 [:db_insert_placeholder_27] => und [:db_insert_placeholder_28] => 253 [:db_insert_placeholder_29] => [:db_insert_placeholder_30] => [:db_insert_placeholder_31] => [:db_insert_placeholder_32] => [:db_insert_placeholder_33] => node [:db_insert_placeholder_34] => 97 [:db_insert_placeholder_35] => 98 [:db_insert_placeholder_36] => contenu_sortie_action [:db_insert_placeholder_37] => 3 [:db_insert_placeholder_38] => und [:db_insert_placeholder_39] => 254 [:db_insert_placeholder_40] => [:db_insert_placeholder_41] => [:db_insert_placeholder_42] => [:db_insert_placeholder_43] => ) dans field_sql_storage_field_storage_write() (ligne 451 dans /var/www/drupal7/modules/field/modules/field_sql_storage/field_sql_storage.module).

What can I do to fix this?

I also can't finalise my upgrade due to missing a widget in field type too - could these problems be linked?


1 Answer 1


If there was changes in the fields you were using in the very nodes, that renders nodes unusable, you will need to export data from 6.x site to some more or less universal format, like csv or xml, and import it anew to 7.x

  • Delete migrated data and it's content type
  • Create new content type with new-style fields, that maps 1:1 to old node structure. If possible, keep names
  • Export node data from original site (recreated from backup if needed), using Node Export, Views data export or similar tool
  • Secure all the files referenced by nodes
  • If needed, manually upload secured files to new version; see next step
  • Import nodes using tool like Node Export or Feeds - it may be required for files to be already uploaded, read the manual of your importing tool
  • so upgrading content at the same time upgrading drupal core isn't the right way ? i've tried the migrate module that it's complete and do the job correctly
    – user8753
    Jun 12, 2013 at 13:43
  • It's theoretical right way that fails way to often to treat is as universal and reliable. Most content types in my experience translates pretty OK, but I'm yet to see a page that will upgrade major version without any problems and manual work.
    – Mołot
    Jun 12, 2013 at 13:44
  • so to verify if i understand, i can check content type that work properly and keep them in this state.For those that doesn't work (break on edit for example) i need to delete them, recreate the content type and then migrate the content "by hand", right ?
    – user8753
    Jun 12, 2013 at 13:55
  • @webmasterpf That's the best way I found so far.
    – Mołot
    Jun 12, 2013 at 13:57
  • what do you think about changing the widget type of a custom field before doing the upgrade ? like changing the widget to "text field" instead of "select list" for a text field type, idem for a file field type, set the widget on "upload file" instead of "image";then, field migration would be easier ?
    – user8753
    Jun 14, 2013 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.