I'm trying to import a spreadsheet (exported to cvs) where I set the column to have the same name as the fields in the flexinode content type that I created. I set the first three colums of the spreadsheet to be title, name, and type and I can import these three columns without issue. However all additional columns fail to import into the flexinode_data table. I have tried the 4.5.0 version of node_import and the cvs version of node_import against Drupal 4.5.0 and I see the same behavior.

CommentFileSizeAuthor
#3 console15.csv12.38 KBjeremy@civicspacelabs.org

Comments

moshe weitzman’s picture

please upload your CSV here. It may be tricky for you to know the proper field names for a flexinode. I think your best approach will be to look at the names of the form fields when creating a new node.

Bèr Kessels’s picture

and more: did you install the import for 4.5?
Were you not looking for node_import by any chanc?
if so, continue on node_aggregator

jeremy@civicspacelabs.org’s picture

StatusFileSize
new12.38 KB

The attached file is my CSV file, but the column names I used were copy and pasted from the flexinote mysql databse entires (I looked in the db). Do you have to have a one to one match of csv column to database fields? Are white spaces in a column name allowed/functional with node_import?

jeremy@civicspacelabs.org’s picture

Environment:

Fedora Core 2 with their standard httpd, mysql and php
Drupal 4.5
The only non-standard modules that are active are:
node_import 4.5.0
flexinode 4.5.0

Bèr Kessels’s picture

please:

import != node aggregator!

node aggregator has nothing to do with csv's or so!

jeremy@civicspacelabs.org’s picture

I'm using "node_import Import nodes from a CSV file" and using "node import" in the nagivation menu.

moshe weitzman’s picture

those are not the correct column titles. correct titles start with flexinode_ and then a number. gain, inspect the form field names on the node/add/flexinode-x page

jeremy@civicspacelabs.org’s picture

Ok, here are the new column headers and I'm still not getting anything beyond title, name and type to import:
title name type flexinode_4 flexinode_7 flexinode_8

pamphile’s picture

"Field names should match columns in your database.
Field values should match those usually entered into your DB."

:(

The readme for the node_import modules does not say it works with flexinodes.
I beleive it assumes that the nodes are all simple nodes.

I also looked inside the node_import code and didn't find any reference to flexinode.

Time to add that capabilty I guess...

http://01classifieds.com

jeremy@civicspacelabs.org’s picture

The readme doesn't say anything at all about flexinodes and I made the assumption that node_import work all of the long standing node types. I figured that the flexinode module would have been popular enough so that someone would have tried to use node_import to load data into a flexinode content type.

Should I just modify an existing module to create an Inventory module that has a more standard table layout?

Ian Ward’s picture

Hey all,
I was just about to try this, did anyone find a way to make it work? It works on CivicSpace w/ the event and contact modules, but for field data these two mods use forms.module, whereas flexinode holds its own fields. Any ideas? Thanks - Ian

bfalling’s picture

In addition to using the correct flexinode field names, e.g. flexinode_3, flexinode_47, etc. as indicated above, I simply added one more column called "ctype_id" which is set to the same number which appears at the end of the content type, e.g. for content type "flexinode-3", the "ctype_id" column should be set to "3".

So, in summary, to import flexinodes:
1) Use a node "type" of "flexinode-X", rather than the friendly name
2) Use field names of "flexinode_Y"
3) Add a column called "ctype_id" set to the value X above

Good luck!

omar’s picture

Just to confirm.... this worked for me with these additional instructions.