Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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,
);
Comment | File | Size | Author |
---|---|---|---|
#4 | 908582-1_taxonomy.patch | 1.08 KB | alex_b |
Comments
Comment #1
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedNot fixed with the latest dev version. (11 sep)
Comment #2
alex_b CreditAttribution: alex_b commentedThis is odd, line 98 is:
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?
Comment #3
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commenteddsm($node->taxonomy)
dsm($term);
Comment #4
alex_b CreditAttribution: alex_b commentedThanks 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?
Comment #5
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedThanks, 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.
Comment #6
alex_b CreditAttribution: alex_b commentedThanks 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.
Comment #7
alex_b CreditAttribution: alex_b commentedThis is committed now, thank you.
http://drupal.org/cvs?commit=423182