Hi,

Everytime I try to import products, I receive the following error:

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /Applications/MAMP/htdocs/dev-store/includes/entity.inc).
Notice: Trying to get property of non-object in file_field_presave() (line 220 of /Applications/MAMP/htdocs/dev-store/modules/file/file.field.inc).
Notice: Undefined property: stdClass::$uri in file_save() (line 570 of /Applications/MAMP/htdocs/dev-store/includes/file.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /Applications/MAMP/htdocs/dev-store/includes/entity.inc).
Notice: Trying to get property of non-object in image_field_presave() (line 236 of /Applications/MAMP/htdocs/dev-store/modules/image/image.field.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /Applications/MAMP/htdocs/dev-store/includes/entity.inc).
Notice: Trying to get property of non-object in file_field_presave() (line 220 of /Applications/MAMP/htdocs/dev-store/modules/file/file.field.inc).
Notice: Undefined property: stdClass::$uri in file_save() (line 570 of /Applications/MAMP/htdocs/dev-store/includes/file.inc).

Here's my importer:

$feeds_importer = new stdClass();
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'products_regular_update';
$feeds_importer->config = array(
  'name' => 'Products regular update',
  'description' => 'Regular update of the products.',
  'fetcher' => array(
    'plugin_key' => 'FeedsFileFetcher',
    'config' => array(
      'allowed_extensions' => 'txt csv tsv xml opml',
      'direct' => FALSE,
    ),
  ),
  'parser' => array(
    'plugin_key' => 'FeedsCSVParser',
    'config' => array(
      'delimiter' => ',',
      'no_headers' => 0,
    ),
  ),
  'processor' => array(
    'plugin_key' => 'FeedsCommerceProductProcessor',
    'config' => array(
      'product_type' => 'product',
      'author' => '1',
      'tax_rate' => TRUE,
      'mappings' => array(
        0 => array(
          'source' => 'SKU',
          'target' => 'sku',
          'unique' => 1,
        ),
        1 => array(
          'source' => 'Quantity',
          'target' => 'commerce_stock',
          'unique' => FALSE,
        ),
        2 => array(
          'source' => 'Regular Price',
          'target' => 'commerce_price:amount',
          'unique' => FALSE,
        ),
        3 => array(
          'source' => 'Sale Price',
          'target' => 'field_sale_price:amount',
          'unique' => FALSE,
        ),
        4 => array(
          'source' => 'Non-Set Price',
          'target' => 'field_non_set_price:amount',
          'unique' => FALSE,
        ),
        5 => array(
          'source' => 'Product ETA Note',
          'target' => 'field_backorder_message',
          'unique' => FALSE,
        ),
      ),
      'update_existing' => '2',
      'input_format' => 'plain_text',
      'skip_hash_check' => 0,
    ),
  ),
  'content_type' => '',
  'update' => 0,
  'import_period' => '3600',
  'expire_period' => 3600,
  'import_on_create' => 1,
  'process_in_background' => 1,
);

Comments

barraponto’s picture

Project: Feeds » Commerce Feeds
Version: 7.x-2.0-alpha7 » 7.x-1.x-dev

This is probably an issue with Commerce Feeds, moving to appropriate queue.

pcambra’s picture

Status: Active » Postponed (maintainer needs more info)

Can you provide a test file to reproduce this problem?

pcambra’s picture

Issue summary: View changes

remove note about csv attached

akosipax’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Seems like this is no longer a problem.