CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Invalid argument supplied for foreach() in /var/www/drupal.civicrm.org/public/si
Pages: [1]

Author Topic: Invalid argument supplied for foreach() in /var/www/drupal.civicrm.org/public/si  (Read 1180 times)

Kimmie_rae

  • Guest
Invalid argument supplied for foreach() in /var/www/drupal.civicrm.org/public/si
May 12, 2008, 04:13:11 pm
does anyone know what may cause this when importing a csv file?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Invalid argument supplied for foreach() in /var/www/drupal.civicrm.org/public/si
May 12, 2008, 05:55:43 pm
Can you turn on your debugging mode in CiviCRM, and paste your backstrace.

kurund
Found this reply helpful? Support CiviCRM

Kimmie_rae

  • Guest
Re: Invalid argument supplied for foreach() in /var/www/drupal.civicrm.org/public/si
May 13, 2008, 04:00:26 pm
Sorry, I'm not very computer literate... and unfortunately our website design company purchased this database for us to use with our website... obviously not understanding that this database is quite complicated.  I don't know how to do the backtrace.  I turned on debugging, but I don't know what to do from there.

Anyway, basically, I import a csv file that looks like this
LName/FName/IndPrefix/HomeChurch/SpouseofLastName/SpouseofFirstName/StreetAddress/City/PostalCode/HomePhone/Email
Smith/John/Mr/Grace Baptist/Smith/Karen/1234 42 Avenue/Surrey/V3S 4K1/604-574-4332/smithj@telus.net

The file I have I've cut down to ten names so that I don't import too many at once, but of that 10 it says it imports them all, (although the subject message at the top of the page is:  warning: Invalid argument supplied for foreach() in /var/www/vhosts/cmacpd.bc.ca/httpdocs/sites/all/modules/civicrm/CRM/Import/Parser/Contact.php on line 672.
But when I search my contact list, only one or two have imported. 

I don't know if something is wrong with the original file?  When importing I choose, individual, and update, and match all the fields listed above.  Help!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Invalid argument supplied for foreach() in /var/www/drupal.civicrm.org/publi
May 14, 2008, 01:26:50 pm
Are the fields in your file actually separated by slash characters (as shown below), or by commas. They need to be separated by commas for the import to work properly.

Code: [Select]
Smith,John,Mr,Grace Baptist,Smith,Karen,1234 42 Avenue,Surrey,V3S 4K1,604-574-4332,smithj@telus.net
Protect your investment in CiviCRM by  becoming a Member!

Kimmie_rae

  • Guest
Re: Invalid argument supplied for foreach() in /var/www/drupal.civicrm.org/public/si
May 21, 2008, 10:01:34 am
It's an excel spreadsheet saved as csv file... so it would be commas... sorry about that... I just typed it in wrong.

I think there was an error in the relationships I was trying to import.  I took that out and was able to import the whole file... now I just have to go through and manually add relationships... a royal pain, but it'll have to do

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Invalid argument supplied for foreach() in /var/www/drupal.civicrm.org/public/si

This forum was archived on 2017-11-26.