Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
coupet,
could you tell me all settings you have for the vocabulary you are importing into? freetagging? required? what do you see in the node_import form for your taxonomy?
thanks
Global fields
Values selected below will be applied to every node imported in this operation.
Categories
vocab1: single select option for terms (, term11, term12, tem13, ...)
vocab2: single select option for terms (, term21, term22, tem23, ...)
vocab3: single select option for terms (, term31, term32, tem33, ...)
vocab4: single select option for terms (, term41, term42, tem43, ...)
content-cckname1
Insert new terms: Yes or No
Preview and Back Button
Note: the cvs file does not include taxonomy field information
Enable the Location module
Enable the Locative information for cck content type in administer » settings » content types
created a cvs file that include location information:
Location Name, Street, Additional Address, City, State or Province, Zip or Postal Code, Country, Latitude, Longitude
Unable to import State or province, Country
Successfully imported Location Name, Street, Additional address, City, Zip or Postal Code
Note: Location module is distributed with State or Province table and Country table
as per supported location include files, the field value for States or Provinces can have the following values:
LIV, LND, LUT, MAN, MDW (examples for UK Provinces)
NY, CT, AL, NJ, DC (examples for US States)
The country code import works nicely.
uk, us (examples for United Kingdom and United States)
coupet,
Thanks for your diligence. I am not able to reproduce these bugs. Please for this thread let's focus on the globally assigning of taxonomy relationships to the entire imported set of nodes. I created a new issue for the location fields not importing. Please see here: http://drupal.org/node/64234
Regarding global importing of taxonomy relationships: I am unable to reproduce this. Could you replace your file import_taxonomy.inc with the attached and try again? Below is what I see when I try to globally associate the imported nodes with 2 terms: 'park' and 'state park'. You should see something similar.
Thanks
Associating this node w/ terms:
array ( 1 => class stdClass { public $tid = '1'; public $vid = '2'; public $name = 'park'; public $description = ''; public $weight = '0'; }, 2 => class stdClass { public $tid = '2'; public $vid = '2'; public $name = 'state park'; public $description = ''; public $weight = '0'; }, )
OK. I know what is going on. I'll fix import_taxonomy.inc. Currently you can only have one list of taxonomy terms, while you have 2. Actually it makes more sense to have one column for each vocabulary (in fact, just like dado's import_taxonomy.inc had). I'll extend it and let you know.
Thx for the test-data (I should be able to fix import_location and import_taxonomy now).
I updated to all latest cvs files, I get the following:
* warning: main(import_content.inc): failed to open stream: No such file or directory in /usr/local/apache/htdocs/sitename.com/dpa/modules/node_import/node_import.module on line 18.
* warning: main(): Failed opening 'import_content.inc' for inclusion (include_path='.:/usr/local/lib/php') in /usr/local/apache/htdocs/sitename.com/dpa/modules/node_import/node_import.module on line 18.
I renamed 'import_cck.inc' to 'import_content.inc' to suppress warnings.
The following scenarios work:
- import taxonomy terms as field values on a per record basis
- import taxonomy terms globally
- import both taxonomy terms as field values on a per record basis or globally
(select global terms for taxonomy terms defined but not being imported)
- import both taxonomy terms as field values on a per record basis and globally
(add global terms to existing taxonomy terms)
The UserInfo field value is not being imported, it shows as anonymous, this value is different than Author.
OK, this issue got hijacked a couple of times. I'll close it but not before I say:
- taxonomy import should now work,
- node author import should now work,
- cck is next on my list.
Closing it. Open an issue with *one* bug if you still have problems.
Comments
Comment #1
dado commentedSome CCK fields are now importable using the CVS HEAD (Drupal 4.7) version of node_import.
See here
http://drupal.org/node/42763
Please report back which CCK fields do and which don't work for you. Thanks!
Comment #2
coupet commentedUsing latest version of cck and node_import
- created a cck content type
- created csv files, and import as per wizard.
cck fields values were imported perfectly.
global fields value (taxonomy terms) selected were not assigned to nodes.
All the nodes imported were not assigned taxonomy terms as selected per wizard.
Comment #3
dado commentedhmm looks like import_taxonomy.inc is misbehaving. did you only try to import taxonomy terms globally (not as field values on a per record basis)?
Comment #4
coupet commentedit is probaly misbehaving as mentioned! only globally.
Comment #5
coupet commentedfield values on a per record basis works perfectly.
Comment #6
dado commentedcoupet,
could you tell me all settings you have for the vocabulary you are importing into? freetagging? required? what do you see in the node_import form for your taxonomy?
thanks
Comment #7
coupet commentedthere are four Vocabulary name: vocab1, vocab2, vocab3, vocab4
for each vocabulary, there are 4-5 terms
there is one cck content type: cckname1
Categories
Types: cckname1 (cck content type)
Hierarchy: single
Related terms - Unchecked
Free tagging - Unchecked
Multiple select - Unchecked
Required - Unchecked
Weight - 0
import screen is as follows:
Global fields
Values selected below will be applied to every node imported in this operation.
Categories
vocab1: single select option for terms (, term11, term12, tem13, ...)
vocab2: single select option for terms (, term21, term22, tem23, ...)
vocab3: single select option for terms (, term31, term32, tem33, ...)
vocab4: single select option for terms (, term41, term42, tem43, ...)
content-cckname1
Insert new terms: Yes or No
Preview and Back Button
Note: the cvs file does not include taxonomy field information
Comment #8
coupet commentedfurther observation:
Import as per field values on a per record basis.
Enable the Location module
Enable the Locative information for cck content type in administer » settings » content types
created a cvs file that include location information:
Location Name, Street, Additional Address, City, State or Province, Zip or Postal Code, Country, Latitude, Longitude
Unable to import State or province, Country
Successfully imported Location Name, Street, Additional address, City, Zip or Postal Code
Note: Location module is distributed with State or Province table and Country table
Comment #9
coupet commentedunable to import States or Province codes.
as per supported location include files, the field value for States or Provinces can have the following values:
LIV, LND, LUT, MAN, MDW (examples for UK Provinces)
NY, CT, AL, NJ, DC (examples for US States)
The country code import works nicely.
uk, us (examples for United Kingdom and United States)
References
'LIV' => "Liverpool", 'LND' => "London City of", 'LUT' => "Luton", 'MAN' => "Manchester", 'MDW' => Medway"
'NY' => "New York", 'CT' => "Connecticut",
Comment #10
dado commentedcoupet,
Thanks for your diligence. I am not able to reproduce these bugs. Please for this thread let's focus on the globally assigning of taxonomy relationships to the entire imported set of nodes. I created a new issue for the location fields not importing. Please see here:
http://drupal.org/node/64234
Regarding global importing of taxonomy relationships: I am unable to reproduce this. Could you replace your file import_taxonomy.inc with the attached and try again? Below is what I see when I try to globally associate the imported nodes with 2 terms: 'park' and 'state park'. You should see something similar.
Thanks
Comment #11
coupet commentedno messages were displayed.
The wizard executed with the following message at completion:
import
Successfully imported 10 nodes.
File: filename_07.csv (812 bytes)
The nodes imported are not assigned to taxonomy terms.
Comment #12
Robrecht Jacques commentedCould you try the current CVS version (import_taxonomy.inc versino 1.5).
Comment #13
coupet commentedworks great!!! imported and taxonomy were assigned. will report will further tests later. thanks
Comment #14
Robrecht Jacques commentedSetting to cvs version. Taxonomy import is not suported for 4.6.
Comment #15
coupet commentedUpdate(1): Unable to import taxonomy terms as field values on a per record basis
Update(2): Able to import taxonomy terms globally
interesting reversal!?
Comment #16
Robrecht Jacques commentedCould you add the CSV file here (not completely, two or three rows is enough - and of course not with sensitive data)?
Comment #17
coupet commentedtest cvs file
Comment #18
Robrecht Jacques commentedOK. I know what is going on. I'll fix import_taxonomy.inc. Currently you can only have one list of taxonomy terms, while you have 2. Actually it makes more sense to have one column for each vocabulary (in fact, just like dado's import_taxonomy.inc had). I'll extend it and let you know.
Thx for the test-data (I should be able to fix import_location and import_taxonomy now).
Comment #19
Robrecht Jacques commentedI think this is fixed in CVS now (import_taxonomy.inc version 1.10). Your example csv file imported without problems.
Let me know.
Comment #20
coupet commentedI updated to all latest cvs files, I get the following:
* warning: main(import_content.inc): failed to open stream: No such file or directory in /usr/local/apache/htdocs/sitename.com/dpa/modules/node_import/node_import.module on line 18.
* warning: main(): Failed opening 'import_content.inc' for inclusion (include_path='.:/usr/local/lib/php') in /usr/local/apache/htdocs/sitename.com/dpa/modules/node_import/node_import.module on line 18.
I renamed 'import_cck.inc' to 'import_content.inc' to suppress warnings.
Comment #21
Robrecht Jacques commentedDid not test CCK yet (i used your csv file to import to a locatoin-enabled page content type).
Renamed import_cck.inc to import_content.inc for consistency.
Does the taxonomy now work?
Comment #22
coupet commentedyes, taxonomy import works prefectly.
The following scenarios work:
- import taxonomy terms as field values on a per record basis
- import taxonomy terms globally
- import both taxonomy terms as field values on a per record basis or globally
(select global terms for taxonomy terms defined but not being imported)
- import both taxonomy terms as field values on a per record basis and globally
(add global terms to existing taxonomy terms)
The UserInfo field value is not being imported, it shows as anonymous, this value is different than Author.
Comment #23
Robrecht Jacques commentedOK. Thanks.
I'll check out the "author" problem.
Comment #24
Robrecht Jacques commentedOK, this issue got hijacked a couple of times. I'll close it but not before I say:
- taxonomy import should now work,
- node author import should now work,
- cck is next on my list.
Closing it. Open an issue with *one* bug if you still have problems.