I am using D 4.7.6 and node_import-4.7.x-1.x-dev.tar dt 2/2/07 and getting following error

warning: Invalid argument supplied for foreach() in /home/incom/public_html/artkerala/modules/node_import/node_import.module on line 259.

Comments

Robrecht Jacques’s picture

Status: Active » Postponed (maintainer needs more info)

Can you give a bit more information? Eg:
- when does the error appear? (when doing the import, the preview, mapping the fields, ...)
- what content type are you trying to import? (if CCK, tell me which fields)
- maybe provide a sample CSV file that shows the problem

Thanks.

yan’s picture

Subscribing, I experienced the same problem. I got the error message right after the first step.

I now figured out that my csv file only contained one line (for testing purposes). It seems as if there needs to be one line with the labels for the columns. After adding that, the error message didn't show up anymore.

(Using drupal 5.6 with Node Import 1.2)

Robrecht Jacques’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Version 4.7.x of the node_import module is no longer supported. Setting this issue as "won't fix".

If you have the same issue with the latest release of the 5.x branch, open a new issue. Thanks.

rusk’s picture

Version: 4.7.x-1.x-dev » 5.x-1.9
Assigned: Unassigned » rusk
Category: support » bug
Priority: Normal » Critical

In node_import.module file in function _node_import_csv_get_row there is the following code

if (($str[$i] == $qualifier) && ($str[$i - 1] != $escape)) { 
   ...

I have an error when importing from word 2007 csv file. There is double quote escape. I mean if in field there is >>Some text with "double quotes"<< then word converts it to >>Some text with ""double quotes""<< for escaping it. Function fgetcsv works properly. But current code isn't. Fix it please.