I'm trying to import a node from a Drupal 6 site into a Drupal 7 site and am getting the following error:

Warning: Invalid argument supplied for foreach() in node_export_file_field_import() (line 1091 of /var/www/html/fosterclub/docroot/sites/all/modules/contrib/node_export/node_export.module).
Warning: Invalid argument supplied for foreach() in node_export_file_field_import() (line 1091 of /var/www/html/fosterclub/docroot/sites/all/modules/contrib/node_export/node_export.module).
Warning: Invalid argument supplied for foreach() in node_export_file_field_import() (line 1091 of /var/www/html/fosterclub/docroot/sites/all/modules/contrib/node_export/node_export.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'nid' cannot be null: INSERT INTO {tracker_node} (nid, changed, published) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => 1390330324 [:db_insert_placeholder_2] => ) in _tracker_add() (line 264 of /var/www/html/fosterclub/docroot/modules/tracker/tracker.module).

My Drupal 6 site is running Node Export 6.x-3.4 and my Drupal 7 site is running Node Export 7.x-3.0.

Comments

criscom’s picture

Same issue here:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_download_display' cannot be null: INSERT INTO {field_data_field_download} (entity_type, entity_id, revision_id, bundle, delta, language, field_download_fid, field_download_display, field_download_description) 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); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 1374 [:db_insert_placeholder_2] => 1374 [:db_insert_placeholder_3] => reports_insights [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 2105 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => ) in field_sql_storage_field_storage_write() (line 451 of /var/www/modules/field/modules/field_sql_storage/field_sql_storage.module).

mautumn’s picture

Same issue here:

WD node: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'last_comment_uid' cannot be null: INSERT INTO                   [error]
{node_comment_statistics} (nid, cid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) 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] => 4729
    [:db_insert_placeholder_1] => 0
    [:db_insert_placeholder_2] => 1395765646
    [:db_insert_placeholder_3] => 
    [:db_insert_placeholder_4] => 
    [:db_insert_placeholder_5] => 0
)
 in comment_node_insert() (line 1314 of /var/www/deploy.bl/public_html/modules/comment/comment.module).

Any help would be really appreciated...

mautumn’s picture

Ah ha! I stumbled on the solution! There is a "uid=" drush node-export-import flag which assigns this UID to the relevant tables. E.G. :-

drush node-export-import --file=exported-data.txt --uid=123

If not specified it manifestly uses a NULL! I assumed it would use the exported values... I also discovered that you can specify the UID on drush export.

I'm very grateful for this module, however, I would like, and prefer, the default behaviour to export the original UIDs - with the option to override on import.

Thanks very much. Keep up the good work on what I know is a notoriously complex area.

selinav’s picture

Same problem

PDOException : SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_fichier_prive_display' cannot be null: INSERT INTO {field_data_field_fichier_prive} (entity_type, entity_id, revision_id, bundle, delta, language, field_fichier_prive_fid, field_fichier_prive_display, field_fichier_prive_description) 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); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 1350 [:db_insert_placeholder_2] => 1350 [:db_insert_placeholder_3] => schema_lectrique [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 300 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => ) dans field_sql_storage_field_storage_write() (ligne 494 dans /home/hengelfrjr/www/modules/field/modules/field_sql_storage/field_sql_storage.module).

How to do without drush (shared hosting)?

danielb’s picture

Status: Active » Closed (outdated)

A number of similar errors have been fixed which may render this issue outdated, additionally exporting from Drupal 6 is no longer supported. If you continue to see this error in the latest code, please reopen.