diff --git a/importexport/inc/class.importexport_import_ui.inc.php b/importexport/inc/class.importexport_import_ui.inc.php index 10842240af..8bb81b1972 100644 --- a/importexport/inc/class.importexport_import_ui.inc.php +++ b/importexport/inc/class.importexport_import_ui.inc.php @@ -310,7 +310,7 @@ $data = translation::convert($data,$options['charset']); $ok = true; - if(count($data) != count($options['field_mapping']) && max(array_keys($data)) != max(array_keys($options['field_mapping']))) + if(count($data) != count($options['csv_fields']) && max(array_keys($data)) != max(array_keys($options['csv_fields']))) { $message[] = lang("Column mismatch. Expected %1 columns, your file has %2.", count($options['field_mapping']), diff --git a/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php b/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php index 8e1f7900b0..cd630834ef 100644 --- a/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php +++ b/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php @@ -369,8 +369,10 @@ class importexport_wizard_basic_import_csv // Clear conditions that don't do anything array_shift($content['conditions']); foreach($content['conditions'] as $key => &$condition) { - if(($condition['true']['action'] == 'none' || !$condition['true']['action']) && !$condition['true']['stop'] - && ($condition['false']['action'] == 'none' || !$condition['false']['action']) && !$condition['false']['stop']) { + if(($condition['true']['action'] == 'none' || !$condition['true']['action']) + && ($condition['false']['action'] == 'none' || !$condition['false']['action']) && + !$condition['string'] + ) { unset($content['conditions'][$key]); continue; }