I'm getting this error with the latest beta5 of feeds.

Everything worked fine with beta3 with the tax inherited patch.

Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.2.13 mod_ssl/2.2.9 OpenSSL/0.9.8g

The inherited vocabulary is a very basic vocabulary with 3-5 terms each.

$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 = 'video';
$feeds_importer->config = array(
  'name' => 'Video',
  'description' => '',
  'fetcher' => array(
    'plugin_key' => 'FeedsHTTPFetcher',
    'config' => array(
      'auto_detect_feeds' => FALSE,
      'use_pubsubhubbub' => FALSE,
      'designated_hub' => '',
    ),
  ),
  'parser' => array(
    'plugin_key' => 'FeedsSyndicationParser',
    'config' => array(),
  ),
  'processor' => array(
    'plugin_key' => 'FeedsNodeProcessor',
    'config' => array(
      'content_type' => 'feed_video_item',
      'update_existing' => '2',
      'expire' => '-1',
      'mappings' => array(
        0 => array(
          'source' => 'guid',
          'target' => 'guid',
          'unique' => 1,
        ),
        1 => array(
          'source' => 'url',
          'target' => 'url',
          'unique' => 1,
        ),
        2 => array(
          'source' => 'url',
          'target' => 'field_feed_video_video',
          'unique' => FALSE,
        ),
        3 => array(
          'source' => 'title',
          'target' => 'title',
          'unique' => FALSE,
        ),
        4 => array(
          'source' => 'timestamp',
          'target' => 'created',
          'unique' => FALSE,
        ),
        5 => array(
          'source' => 'description',
          'target' => 'body',
          'unique' => FALSE,
        ),
        6 => array(
          'source' => 'parent:taxonomy:1',
          'target' => 'taxonomy:1',
          'unique' => FALSE,
        ),
        7 => array(
          'source' => 'parent:taxonomy:5',
          'target' => 'taxonomy:5',
          'unique' => FALSE,
        ),
      ),
      'author' => 0,
      'input_format' => 0,
    ),
  ),
  'content_type' => 'feed_video',
  'update' => 0,
  'import_period' => '0',
  'expire_period' => 3600,
  'import_on_create' => 1,
);
CommentFileSizeAuthor
#4 908582-1_taxonomy.patch1.08 KBalex_b
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

XiaN Vizjereij’s picture

Not fixed with the latest dev version. (11 sep)

alex_b’s picture

Status: Active » Postponed (maintainer needs more info)

This is odd, line 98 is:

$node->taxonomy[$vocabulary->vid][$term->tid] = $term->tid;

So somehow either $node->taxonomy or $node->taxonomy[$vocabulary->vid] are an object where they should be an array.

Could you print $node->taxonomy and $term instead of line 98 and see what they contain?

dsm($node->taxonomy);
dsm($term);
XiaN Vizjereij’s picture

Status: Postponed (maintainer needs more info) » Active

dsm($node->taxonomy)

... (Array, 2 elements)
1 (Object) stdClass
tid (String, 1 characters ) 1
vid (String, 1 characters ) 1
name (String, 7 characters ) English
description (String, 0 characters )
weight (String, 1 characters ) 0
13 (Object) stdClass
tid (String, 2 characters ) 13
vid (String, 1 characters ) 5
name (String, 8 characters ) Gameplay
description (String, 0 characters )
weight (String, 1 characters ) 0

dsm($term);

... (Object) FeedsTermElement
tid (String, 1 characters ) 1
vid (String, 1 characters ) 1
name (String, 7 characters ) English
alex_b’s picture

Version: 6.x-1.0-beta5 » 6.x-1.x-dev
Status: Active » Needs review
FileSize
1.08 KB

Thanks for reporting back. I see what's going on ...

You are using update existing and this is where there are already taxonomy terms in place. While on a new node taxonomy module accepts taxonomy in the format $node->taxonomy[$vid][$tid] = $tid, it doesn't accept it on existing nodes as there is already a taxonomy array in the format $node->taxonomy[$tid] = $term;

Does this patch fix your problem?

XiaN Vizjereij’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, its working now :)

Edit : One thing i noticed ... can it be that the tax mapper manipulates the nodes "last updated" time even if it doesn't change any tax?
I kind of noticed that once the tax mapper was broken, i got ~100 updated nodes per day ( this is correct, because of changes in the feeds ). Now with the tax mapper back i get ~1000 updated nodes, with 900 not being changed at all.

alex_b’s picture

Thanks for the review.

Not the mapper, but the processor changes the 'last updated' (=changed) date of a node.

FeedsNodeProcessor saves a node no matter whether it has changed or not. Every time a node is saved the 'changed' time is updated.

alex_b’s picture

Status: Reviewed & tested by the community » Fixed

This is committed now, thank you.

http://drupal.org/cvs?commit=423182

Status: Fixed » Closed (fixed)

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