Have a problem when i want import a taxonomy term like '204', '3245', when is a numeric.
feeds import assigned this like a numeric so like a tid or is not a tid is a text value.
For example : in my taxonomy list i have a value '204' with a tid=34 and a velue 'hello' with a tid=204
so when i import my node with a field taxonomy term '204' he assign value 'hello' and not '204'

Comments

michael_cristal’s picture

i have find a way but i think works only in my case
on file feeds/mapper/taxonomy.inc line 84
i change this

$i = 0;
  $entity->$target = isset($entity->$target) ? $entity->$target : array();
  foreach ($terms as $term) {
    $tid = 0;
    if ($term instanceof FeedsTermElement) {
      $tid = $term->tid;
    }
    elseif (is_numeric($term)) {
      $tid = $term;
    }
    elseif (is_string($term)) {
      $tid = taxonomy_term_check_term($term, $vocabulary->vid);
    }
    if ($tid) {
      $entity->{$target}['und'][$i]['tid'] = $tid;
    }

by this

 $i = 0;
  $entity->$target = isset($entity->$target) ? $entity->$target : array();
  foreach ($terms as $term) {
    $tid = 0;
    if ($term instanceof FeedsTermElement) {
      $tid = $term->tid;
    }
    elseif (is_numeric($term) && !taxonomy_term_check_term(strval($term), $vocabulary->vid)) {
      $tid = $term;
    }
    else {
      $tid = taxonomy_term_check_term(strval($term), $vocabulary->vid);
    }
    if ($tid) {
      $entity->{$target}['und'][$i]['tid'] = $tid;
    }
Sorin Sarca’s picture

Category: bug » support
Status: Active » Closed (won't fix)

I'm sorry, you are talking about some other module. This module is Feed Import.