csv PICK column import

0

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.

asked Aug 12 '10 at 9:06

michael_db

1

edited Aug 12 '10 at 9:07

add comment
enter at least 15 characters

8 Answers

0

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?

answered Aug 12 '10 at 10:49

michael_db

1

add comment
enter at least 15 characters
0

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.

answered Aug 13 '10 at 4:47

sc0ttkclark

2123

add comment
enter at least 15 characters
0

Also the array() is not necessary.

answered Aug 13 '10 at 4:47

sc0ttkclark

2123

add comment
enter at least 15 characters
0

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?

answered Aug 13 '10 at 3:27

michael_db

1

edited Aug 13 '10 at 3:28

add comment
enter at least 15 characters
0

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.

answered Aug 14 '10 at 2:29

michael_db

1

add comment
enter at least 15 characters
0

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.

answered Aug 14 '10 at 10:06

michael_db

1

edited Aug 14 '10 at 10:06

add comment
enter at least 15 characters
0

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

answered Aug 15 '10 at 5:11

sc0ttkclark

2123

did you manage to figure it out? – thiswayup Sep 2 '10 at 2:12
add comment
enter at least 15 characters
0

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!

answered Sep 7 '10 at 12:22

lawrence.siulagi

1

edited Sep 15 '10 at 1:23

add comment
enter at least 15 characters