csv PICK column import
Hi, I'm trying to import some csv files with this package: http://podscms.org/packages/pod-page-csv-import/ It works for the simple csv's with no PICK column. But when I try to import a PICK column I get this error:
Cannot add relationships; SQL: INSERT INTO ct_pod_rel (pod_id, sister_pod_id, field_id, tbl_row_id, weight) VALUES (2099, 0, 47, Van Buggenhout, 0); Response: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Buggenhout, 0)' at line 1
the first 2 lines of my csv file are:
id,number,name,owner,sort,race,sex,birth,size,description,thumbnail,picture1,picture2,picture3,picture4,actief,slug 1,0001,Alvin,"array(Van Buggenhout)","array(Honden KLEIN)","array(- MIX -)","array(Vrouwelijk)",1998,30,"Alvin is een hele lieve, zachte hond. Heeft veel ervaring voor de camera. ",dog_t.jpg,dog_1.jpg,dog_2.jpg,dog_3.jpg,dog_4.jpg,1,Alvin
I'm guessing I got the array part wrong, but can someone tell me what I'm doing wrong here?
Thanks.
edited Aug 12 '10 at 9:07
8 Answers
Well, I it seems i used the wrong PICK column name, so I don't get the errors anymore, but the PICK columns still refuse to import. Everything else does, except for the PICK columns. Anybody?
Hi, the import process assumes the pick column values already exist. Currently, the import process does not create new pod items for the related pick's Pod if it doesn't exist.
Also the array() is not necessary.
just so I'll understand this well:
I got a pod called 'species', where 'Hoefdieren' is the name value for one of the items. I got a second pod called 'race' with a pick column for, and called 'species'. I'd like to import 'Lama' as the name value and set the 'species' pick column on 'Hoefdieren', wich is already defined in the 'species' pod. And i use this code to import it:
id,name,species 2,Lama,Hoefdieren
How I understand it, this should be correct, right?
edited Aug 13 '10 at 3:28
If somebody could help me understand this import thing, please? I'm clearly doing something wrong, but I don't know what. And beginning to get quite desperate actually :)
Thanks.
So, I gave it another shot, I filled in a record by hand and exported that to a csv using the export pod page, then tried to import that csv file thinking that at least that should work, but nothing. What gives? I think I might just give up on this one.
edited Aug 14 '10 at 10:06
Sorry, I'm pretty limited when I'm this far removed from a site, could you perhaps allow me to access your WP and the csv file and php-based importer code you're utilizing? contact (at) podscms.org
I'm interested in the answer to this, too. I created a pod using PICK relationships, tested by manually entering data, imported/exported CSV using the API docs for CSV import/export (utilizing PICKs). Upon import of exported data
name,r_subtitle,author,r_summary,r_call_id,level,topic,type,format,r_quantity,r_copyright,r_slug,r_number,r_topic_code,author_code,reprint,author_last "Resource Title2","Subtitle2 of Resource","First Names of authors","This is a summary text field for the resource.",array(05ATF),array(High),array(Animal),array(Bibliography),array(Book),1.00,2000,,123,array(ANL),"Author Code",1,"Last names of authors"
I received "Warning: implode() [function.implode]: Invalid arguments passed in /.../public_html/wp-content/plugins/pods/classes/PodAPI.php on line 1469" errors for each PICK field.
Help!
edited Sep 15 '10 at 1:23
