I'm writing support for Ubercarts uc_stock module.
Getting the following when previewing the imported nodes (step 7 I think):

warning: Invalid argument supplied for foreach() in /Users/alex/Sites/apps/drupal-6/sites/usa.kakadu.local/modules/node_import/node_import.inc on line 660.

Line 660 looks like (last one here):

   // Preprocess the data as long as the value is not empty and it
    // validates.
    foreach ((array)$values[$fieldname] as $i => $value) {
      foreach ($fieldinfo['preprocess'] as $function) {

Seems on that line you don't check if 'preprocess' exisit before your reference it. Sandwiching an IF statment in there should fix it.

   // Preprocess the data as long as the value is not empty and it
    // validates.
    foreach ((array)$values[$fieldname] as $i => $value) {
      if(isset($fieldinfo['preprocess']))
        foreach ($fieldinfo['preprocess'] as $function) {

Comments

cpill’s picture

opps, this should be in the 'node_import' issues :P

cpill’s picture

Project: Internationalization » Node import
cpill’s picture

Version: 6.x-1.x-dev » master
Robrecht Jacques’s picture

Version: master » 6.x-1.x-dev

This has been fixed. Will be included in -rc5. Thanks!

Robrecht Jacques’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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