Environment
Using the following environment: 1.) A Drupal 6 installation with the node export module (6.x-3.0-rc3) working. 2.) A Drupal 7 installation with feeds (7.x-2.x-dev) and node export (+feeds) (7.x-3.x-dev).
Problem
I would like to export some nodes from the D6 Site to the D7 site. Creating the CSV within the D6 site seems to be no problem, but importing into the D7 environment is quite tricky: I am only able to import one node at once. If the csv has more than one node only the last one will be imported.
Tested several importer settings, even the out-of-the-box node export import importer doesn't work. With the "normal" node feed importer I made everything work fine except the bulk import:
$feeds_importer = new stdClass;
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'node';
$feeds_importer->config = array(
'name' => 'Node import',
'description' => 'Import nodes from CSV file.',
'fetcher' => array(
'plugin_key' => 'FeedsFileFetcher',
'config' => array(
'direct' => FALSE,
'allowed_extensions' => 'txt csv tsv xml opml',
),
),
'parser' => array(
'plugin_key' => 'FeedsCSVParser',
'config' => array(
'delimiter' => ',',
'no_headers' => 0,
),
),
'processor' => array(
'plugin_key' => 'FeedsNodeProcessor',
'config' => array(
'content_type' => 'kirche2null',
'update_existing' => '1',
'expire' => '-1',
'mappings' => array(
0 => array(
'source' => 'title',
'target' => 'title',
'unique' => 0,
),
1 => array(
'source' => 'body',
'target' => 'body',
'unique' => FALSE,
),
2 => array(
'source' => 'published',
'target' => 'created',
'unique' => FALSE,
),
3 => array(
'source' => 'guid',
'target' => 'guid',
'unique' => 1,
),
),
'input_format' => 'full_html',
'author' => 0,
),
),
'content_type' => '',
'update' => 0,
'import_period' => '0',
'expire_period' => 3600,
'import_on_create' => 1,
'process_in_background' => 0,
);
This is an example of my generated csv (with two nodes):
nid,type,language,uid,status,created,changed,comment,promote,moderate,sticky,tnid,translate,vid,revision_uid,title,body,teaser,log,revision_timestamp,format,name,picture,data,path,last_comment_timestamp,last_comment_name,comment_count,taxonomy['tags']['3'],uuid,revision_uuid,menu['link_title'],menu['mlid'],menu['plid'],menu['menu_name'],menu['weight'],menu['module'],menu['expanded'],menu['hidden'],menu['has_children'],menu['customized'],menu['parent_depth_limit']
551,kirche2null,de,3,1,1312800769,1312800769,2,0,0,0,0,0,552,3,Wie Facebook-Seiten so ticken ,"<p>Jede Facebook-Seite ist anders. Darum ist es auch gut, seine Dialoggruppe dort zu kennen. Trotzdem ist es interessant, was die Zusammenschau von Facebook-Seiten so ergibt. <a href=""http://www.socialbench.de/infografik"">SocialBench</a> hat eine Infografik erstellt, die solch eine Analyse bietet (<a href=""http://allfacebook.de/zahlen_fakten/infografik-die-aktivitat-von-deutschen-facebook-seiten-und-nutzer?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Allfacebookde+%28allfacebook.de%29"">via</a>, <a href=""http://www.facebookbiz.de/artikel/wann-sind-deutsche-facebook-seiten-nutzer-am-aktivsten"">via</a>). Die Angaben für Deutschland werden wohl in Österreich ähnlich sein. Interessant ist die Tatsache, dass unter der Woche mehr auf Seiten durch die AdministratorInnen gepostet wird, die Fans aber genauso am Wochenende aktiv sind. </p>
<p><img alt=""Infografik Facebook"" width=""680"" height=""2323"" src=""http://farm7.static.flickr.com/6121/6021672698_84f699f2e9_o.jpg"" /></p>","<p>Jede Facebook-Seite ist anders. Darum ist es auch gut, seine Dialoggruppe dort zu kennen. Trotzdem ist es interessant, was die Zusammenschau von Facebook-Seiten so ergibt. <a href=""http://www.socialbench.de/infografik"">SocialBench</a> hat eine Infografik erstellt, die solch eine Analyse bietet (<a href=""http://allfacebook.de/zahlen_fakten/infografik-die-aktivitat-von-deutschen-facebook-seiten-und-nutzer?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Allfacebookde+%28allfacebook.de%29"">via</a>, <a href=""http://www.facebookbiz.de/artikel/wann-sind-deutsche-facebook-seiten-nutzer-am-aktivsten"">via</a>). Die Angaben für Deutschland werden wohl in Österreich ähnlich sein. Interessant ist die Tatsache, dass unter der Woche mehr auf Seiten durch die AdministratorInnen gepostet wird, die Fans aber genauso am Wochenende aktiv sind. </p>
<p><img alt=""Infografik Facebook"" width=""680"" height=""2323"" src=""http://farm7.static.flickr.com/6121/6021672698_84f699f2e9_o.jpg"" /></p>",,1312800769,1,andrea,sites/www.thematisch.at/files/pictures/picture-3.jpg,"a:3:{s:13:""form_build_id"";s:37:""form-bfbc81698bb5ca443f4cf89dd908a2b8"";s:14:""picture_delete"";s:0:"""";s:14:""picture_upload"";s:0:"""";}",kirche2null/wie-facebook-seiten-so-ticken,1312801095,Wie Facebook-Seiten so ticken | Kirche 2.0 | Scoop.it,1,"Facebook, Infografik, Seiten",a10dd96e-931e-102f-b728-0050569365c1,FALSE,,0,0,primary-links,0,menu,0,0,0,0,8
550,kirche2null,de,3,1,1312195842,1312195842,2,0,0,0,0,0,551,3,Kirche 2.0 Links für zwischendurch,"<p><img alt=""Baustelle"" width=""450"" height=""338"" src=""http://farm3.static.flickr.com/2065/2512726423_d4331b323f.jpg"" /></p>
<p>Normalerweise gibt es hier rund um den Monatswechel eine Sammlung interessanter Links zum Thema Kirche und Social Media. Das ist diesmal nicht so. Wir basteln ganz fleissig an einer neuen Plattform zum Thema und verarbeiten alle neuen Inhalte gleich für dort. Ende August wollen wir diese neue Webpage, selbstverständlich auch wieder mit Blog, präsentieren. Erweitert wird dieses um einige spezielle Funktionen, z.B. eine schöne Übersicht über Veranstaltungen zum Thema in Oberösterreich und einer besseren Aufbereitung von Basis-Informationen für Social Media-EinsteigerInnen. <br />
Im Web geht es allerdings rasant weiter und das nicht nur bei <a href=""http://sende-zeit.de/2011/07/26/google-plus-alles-neu/"">Google+</a> ;-) Darum gibt es zwischenzeitlich trotzdem einige sehr interessante Links. Diese sammle ich derzeit mit Scoop.it, einen netten neuen Tool. Watch out: <a href=""http://www.scoop.it/t/kirche-2-0"">Kirche 2.0 auf Scoop.it</a>. </p>
<p>Foto <span property=""dc:identifier dct:identifier"" style=""display: inline; "">CC BY-ND <a href=""http://www.flickr.com/photos/detlefschobert/2512726423/in/photostream/"">Detlef Schobert</a> </span></p>
<p> </p>","<p><img alt=""Baustelle"" width=""450"" height=""338"" src=""http://farm3.static.flickr.com/2065/2512726423_d4331b323f.jpg"" /></p>
<p>Normalerweise gibt es hier rund um den Monatswechel eine Sammlung interessanter Links zum Thema Kirche und Social Media. Das ist diesmal nicht so. Wir basteln ganz fleissig an einer neuen Plattform zum Thema und verarbeiten alle neuen Inhalte gleich für dort. Ende August wollen wir diese neue Webpage, selbstverständlich auch wieder mit Blog, präsentieren. Erweitert wird dieses um einige spezielle Funktionen, z.B. eine schöne Übersicht über Veranstaltungen zum Thema in Oberösterreich und einer besseren Aufbereitung von Basis-Informationen für Social Media-EinsteigerInnen. <br />
Im Web geht es allerdings rasant weiter und das nicht nur bei <a href=""http://sende-zeit.de/2011/07/26/google-plus-alles-neu/"">Google+</a> ;-) Darum gibt es zwischenzeitlich trotzdem einige sehr interessante Links. Diese sammle ich derzeit mit Scoop.it, einen netten neuen Tool. Watch out: <a href=""http://www.scoop.it/t/kirche-2-0"">Kirche 2.0 auf Scoop.it</a>. </p>",,1312195842,1,andrea,sites/www.thematisch.at/files/pictures/picture-3.jpg,"a:3:{s:13:""form_build_id"";s:37:""form-bfbc81698bb5ca443f4cf89dd908a2b8"";s:14:""picture_delete"";s:0:"""";s:14:""picture_upload"";s:0:"""";}",kirche2null/kirche-20-links-f-r-zwischendurch,1312195842,NULL,0,Kirche 2.0,a10df0de-931e-102f-b728-0050569365c1,FALSE,,0,0,primary-links,0,menu,0,0,0,0,8When I try to import the nodes, only the last one will be imported. What do I do wrong? Help would be much appreciated. I mean, if i have to import the nodes seperatly I also could do it manually within the add/node form. Many greetings and thanks in advance.
Comments
Comment #1
ressaWith these modules I am able to export my nodes in CSV format from D6, and import them to D7, using a feed:
Perhaps if you try these versions it might work for you? I don't have the Node Export module in my Drupal 7 installation, it works fine without for me without it.
Comment #2
emackn commentedHave you tried the Migrate module?
Comment #3
megachrizThere is no guid column in your CSV file, which you have set as unique. This causes the GUID value to be the same for all rows and will make Feeds think that every row is an update of the previous one. Ultimately, this results that only the data from the last row remains.
Comment #5
jweirather commentedI just wanted to add a +1 and a thank you for @MegaChriz's comment #3 above.
In our case, in the source xls file, someone had unwittingly added a character to the header/label for the column we were mapping to GUID. As a result, that column was ignored by Feeds, so there was no source GUID field, causing Feeds to only import or update the last row.