I get this error when attempting to create nodes from an imported CSV file. I triple checked the CSV formatting, tried truncating the CSV file to 1 row, etc. It creates one node of the custom content type, but doesn't add any information to it.

Warning: Invalid argument supplied for foreach() in form_set_error() (line 1510 of /var/www/drupal/includes/form.inc).

I'm somewhat new to Drupal, so I may be in over my head here.

Comments

ideafarm’s picture

I am getting exactly the same error, did you ever fix it?

SolomonGifford’s picture

I'm also getting this error.

fishclic’s picture

Same here.

donwinchell’s picture

Version: 7.x-2.0-alpha3 » 7.x-2.x-dev

I get the same thing. I stripped the csv down to only 3 records (plus a header) only nid, uid, title, body. stripped out all html.
I have tried this with the 7.x-2.x-dev as well as 7.x.20-alpha3 same results.

donwinchell’s picture

Form.inc line 1510- invalid argument for form_set_error
I am not too good at php but data migration fascinates me. I would help track this down if someone would point me in the right direction. It seems there has been no activity on this in close to a month.
Do others have "feeds" happily doing imports?

prb75’s picture

I get this same error. Guess I will use ODBC...

jay-dee-ess’s picture

When I changed the "Basic Settings" > "Attach to content type" setting to "Use Standalone Form", this error went away. Hope it helps someone...

firestonej’s picture

Status: Active » Needs review

Yep, same fix as john-ess worked for me. Just can't use the node submission for some reason.

I'll set this to needs review until an admin can let us know whether this will be fixed.

jdaniluk’s picture

I was getting the same error, but "use standalone form" worked for me too. First time I've tried importing a CSV, and I was sure it was something wrong with my data or the mappings definition. Happy that there is such an easy workaround.

pianory’s picture

If it helps anyone, I was using Microsoft Excel 2011 (Mac version), and the import didn't work until I did the "use standalone form" method AND saved as "Windows Comma Separated (.csv)" version. The import did not work when saved as a "typical" CSV through MS Excel 2011, or as an MS-DOS CSV.

dave reid’s picture

Status: Needs review » Fixed

This error should be fixed in the latest 7.x-2.x-dev now. I found the cause of this and it was included in a separate fix.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.