diff --git a/resources/inc/class.resources_import_csv.inc.php b/resources/inc/class.resources_import_csv.inc.php index 984b41af4d..7723820b69 100644 --- a/resources/inc/class.resources_import_csv.inc.php +++ b/resources/inc/class.resources_import_csv.inc.php @@ -139,10 +139,9 @@ class resources_import_csv implements importexport_iface_import_plugin { // don't import empty records if( count( array_unique( $record ) ) < 2 ) continue; - if(!is_numeric($record['cat_id']) && strpos($record['cat_id'], ',') === False) { - $this->errors[$import_csv->get_current_position()] = lang('Bad category ID: %1. Try cat(|[]) in definition.', $record['cat_id']); - continue; - } + // Automatically handle text categories without explicit translation + $record['cat_id'] = importexport_helper_functions::cat_name2id($record['cat_id']); + if ( $_definition->plugin_options['conditions'] ) { foreach ( $_definition->plugin_options['conditions'] as $condition ) { switch ( $condition['type'] ) {