hello,
I can successfully import a list in CSV format, when i try with text only cck field types.
But i cant import a list when it has a CCK field of type text, drop down select list, using node_import.
The values are to be imported are from the allowed text list.

Any help appreciated, as this is blocking the development of my whole site.

Comments

yang_yi_cn’s picture

I'm having the same problem...

martinkong’s picture

Status: Active » Needs review

Comment out:

- line 647 of node_import.module
$node->in_preview = TRUE;

This will let you see the select list values on the preview page (last page).

- line 653 of node_import.module
node_submit($node);

This will let you actually save the select list values.

Not sure if this is the proper way of fixing this bug, so I won't bother providing a patch file.

bengtan’s picture

Title: cant import when feild is "select text" » cant import when field is "select list"

I'm having the same problem, and found a workaround. Temporarily change the widget of your affected CCK field from "Select list" to "Text Field", do your import, and then change it back. It works for me, so give it a try.

I looked into the code a bit . . .

It seems like the node_submit() (from line 653) calls into the CCK group of modules, and then something in there is wiping out the value. I suspect the widget, since it works with a "Text field" widget but not with the "Select list" widget.

However, you don't want to simply comment out line 653. The node_submit() also invokes nodeapi('submit'), which you probably want to keep.

dwees’s picture

See this comment for a patch which I think will fix your problem.

Dave

m4manas’s picture

This will fix your problem
http://drupal.org/node/265716

Robrecht Jacques’s picture

Status: Needs review » Closed (duplicate)

The issue #265716 has been fixed in node_import-5.x-1.8 which will be released next weekend. Setting this as duplicate.

johnhanley’s picture

bengtan, your suggestion worked exactly as described. Node import 5.x wasn't previewing a CCK field defined as a "select list" so I temporarily change the widget to "text", did the import, and then changed the widget back to "select list" and the option value is correctly selected for each node. Thanks!