Hi,
To the best of my understanding this is a bug, or actually two bugs. Lets me know otherwise and I'll change this issue's classification.
Task: I wish to import multiple rows of data in a CSV file to a special node type I prepared and called "business". This node type has a taxonomy field ("Business type") and location property (several fields).
The problem is that when I followed the very nice wizard for the import process, during the mapping of the fields I bump into problem. What happens is that in the mapping screen I can choose the field in the file to map to the taxonomy field, but the taxonomy field is displayed as Taxonomy: <em> business type </em> . I don't have the screen in front of me and as I already fixed the issue, I'm pretty sure that this was what I got. the important thing to note is the original "em" tags that somehow entered the form. Ignoring those tags sends you to a dead end - see attached picture. It shows the same problem that was with the location fields (see first green line in the red error boxes).
Same issue is happening with some location fields - they are fetched by the node import wizard with strange, "em" tags (see attachment...).
It took me time, but I managed to track it down:
taxonomy_node_import_fields() in taxonomy.inc is being used to get the fields of taxonomy during the node import work. Now, on line 14, the t() function calls theme('placeholder'...) on the parameter (the fetched taxonomy term) and that is calling theme_placeholder in theme.inc (drupal theme file, under /includes, not my custom theme file). This function is the culprit - it adds "em" tag around the value and returns it.
Now, I'm not sure why we need the t() function here (taxonomy term should be translated?...). In my case, I changed line 14 in supported/taxonomy.inc to: $fields['node_import_taxonomy_'. $vocab->vid] = 'Taxonomy: ' . check_plain($vocab->name);
same goes for location_node_import_fields() in location.inc file:
//line 15
$fields['node_import_location_'. $field] = 'Location: ' . $fieldname; Both might be better fixed, but "it works for me"... :-)
| Comment | File | Size | Author |
|---|---|---|---|
| original_import_issue.png | 37.69 KB | boaz_r |
Comments
Comment #1
Robrecht Jacques commentedFixed. Will be included in next release of node_import (5.x-1.5). Thanks!
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.