Even though a field may be set to "not required" in the node setup, node_import throws an error when you do not assign the field a value during import. Temporary work around is to create a new "blank" column in the import CSV, and then just set every "optional" location field to your blank column.

Comments

newmediaist’s picture

Title: Node import ignores non-required location fields (Location module) » Integration with nodereference fields only works if nodereference field set to "select" widget

pasted two bug reports in one msg by mistake - here is what the above msg should have said:

When trying to import into a nodereference field which is set as a text (auto-complete) widget, node-import throws an errors. Change the nodereference field widget into a select box, and node-import is able to import into the field fine.

aren cambre’s picture

subscribe. This is eerily similar to #374346: Can't import date values into Date module fields where the solution is the same: use select list.

Junro’s picture

same problem, subscribe :)

wilgrace’s picture

Is this true? To import into nodereference the widget has to be a select box? I don't think that's working for me

Or does the entry in the CSV file have to reference the node ID, not the name?

Junro’s picture

Yep, it's true...

You have to use the reference name... it doesn't work with the ID.

and what about nodes with same name? Don't ask... lol I should experiment this soon..

wilgrace’s picture

Hm, I can't get this to work - I'm using a Select Box widget for the CCK nodereference field, and then in the CSV import I have the full name of the node to be referenced. Not working at all.

I've also tried this solution: http://drupal.org/node/288185
but that's not working either, as per the last comment.

Would be great to get nodereference working... Any other ideas?

vamosamorir2’s picture

same problem same solution . It's great ¡

wilgrace’s picture

You got this working using the Select Box and reference name? Hm, maybe a problem in my CSV file if it's working for others...

drubytue’s picture

Neither select nor autocomplete works for me. Importing records with node reference fields is critical for my application. Is there any progress on this?

Anonymous’s picture

Setting node ref to select box, instead of autocomplete, fixed my problem -- using the latest dev version.

drubytue’s picture

The select box solution now works for me, too. Still hoping RC5 will support autocomplete.

David Lesieur’s picture