Closed (duplicate)
Project:
Node import
Version:
5.x-1.2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2007 at 16:29 UTC
Updated:
12 Aug 2009 at 04:20 UTC
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
Comment #1
yang_yi_cn commentedI'm having the same problem...
Comment #2
martinkong commentedComment 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.
Comment #3
bengtan commentedI'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.
Comment #4
dwees commentedSee this comment for a patch which I think will fix your problem.
Dave
Comment #5
m4manas commentedThis will fix your problem
http://drupal.org/node/265716
Comment #6
Robrecht Jacques commentedThe issue #265716 has been fixed in node_import-5.x-1.8 which will be released next weekend. Setting this as duplicate.
Comment #7
johnhanley commentedbengtan, 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!