Index: importexportapi.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/importexportapi/importexportapi.module,v retrieving revision 1.14 diff -u -r1.14 importexportapi.module --- importexportapi.module 2 Jul 2006 12:31:38 -0000 1.14 +++ importexportapi.module 2 Jul 2006 22:02:53 -0000 @@ -233,7 +233,9 @@ // Use default field values for any fields that haven't been set. $default_values = importexportapi_get_field_type_info($field['#type']); - $field += $default_values; + # $field += $default_values; + $field = array_merge((array)$default_values,$field); + if (isset($field['#process']) && isset($default_values['#process'])) { $field['#process'] = array_merge($default_values['#process'], $field['#process']); } @@ -502,9 +504,10 @@ function importexportapi_export_data($entities, $put_format, $put_id = NULL, $get_format = NULL) { $def = importexportapi_get_def(); - foreach ($entities as $entity) { - if (!isset($def[$entity])) { - return NULL; + foreach ($entities as $i => $entity) { + if (! $def[$entity]) { + drupal_set_message("The data entity $entity is unknown, no definition available. Not using it to export",'error'); + unset($entities[$i]); } } @@ -514,16 +517,19 @@ $get_callbacks = importexportapi_get_engine($get_format); if (!isset($get_callbacks['callback'])) { + drupal_set_message("No known callback, Aborting export",'error'); return NULL; } $function = $get_callbacks['callback']; if (!function_exists($function)) { + drupal_set_message("Callback $function() unavailable, Aborting export",'error'); return NULL; } $put_callbacks = importexportapi_get_engine($put_format, 'put'); if (!isset($put_callbacks['callback'])) { + drupal_set_message("Callback engine unavailable, Aborting export",'error'); return NULL; }