I have a problem with the Feeds-module. It is the same problem as here (http://drupal.org/node/769084). My system is also only importing the first feed item.

I tried the solution that was suggested but that is not working. The table columns "guid" and "url" are empty.

Some facts:
- I use the Twitter search parser
- Targets URL and GUID are set to unique target

Someone can help me with this issue? I have included the "FeedsTwitterParser.inc" also. I made some modifications.

CommentFileSizeAuthor
FeedsTwitterParser.inc_.test3.36 KBufeg02
mapping.JPG49.4 KBufeg02

Comments

alex_b’s picture

A good place to start debugging is the processor's existingItemId() method.

ufeg02’s picture

How is it possible that the database columns are empty?

The table columns "guid" and "url" are empty. <- in table feeds_node_item

alex_b’s picture

Check what the node object looks like before it's saved (see node_save($node) in FeedsNodeProcessor).

ufeg02’s picture

The nodes are correct created.

This is how my table "feeds_node_item" looks.

nid id feed_nid imported url guid hash
4392 twitterstatussen 2236 1276614222
4393 twitterstatussen 4090 1276614222
4394 twitterstatussen 1760 1276614222
4395 twitterstatussen 2220 1276614282
4396 twitterstatussen 1635 1276614282
4403 testgewoneimport 0 1276617222 (this is corresponding with the node 4403)

This is the content of the "node" table.

nid vid type language title uid status created changed comment promote moderate sticky tnid translate
4403 4557 twitter_status dsonline: #sport Man dreigt met bom in 'fan park':... 0 1 1276608205 1276618313 2 1 0 0 0 0

alex_b’s picture

While there appears to be a valid mapping from Twitter link to URL and from GUID to GUID it seems that the URL and the GUID properties of the node are actually not being populated. I wonder why.

- Is it because the feed does not contain valid twitter link and GUID?
- Does the parser not detect the twitter link and the GUID?
- Is there a problem in FeedsNodeProcessor that causes it node to populate the node properly although twitter link and GUID are present?

If you print $node to the screen before node_save($node); is called in FeedsNodeProcessor::process() - what does it say? There should be a

$node->feeds_node_item->url;
$node->feeds_node_item->guid;

on it. If those values are empty, are they present on the $item returned by $batch->shiftItem() in FeedsNodeProcessor::process() ? If they are, there must be something wrong with the mapping that is defined on the processor. If they aren't - the parser is not parsing them out correctly.

ufeg02’s picture

I installed the logging module and this error shows up:

Location http://localhost/batch?id=125&op=do
Referrer http://localhost/batch?op=start&id=125
Bericht mysql_real_escape_string() expects parameter 1 to be string, array given in J:\wamp\www\includes\database.mysql.inc on line 321.

Maybe it is related?

ufeg02’s picture

This is a part of the errorcode generated when I try to import a feed.

An error occurred. /batch?id=130&op=do #0 db_escape_string(Array ([0] => http://twitter.com/VincentVQ/statuses/16393706895)) called at [J:\wamp\www\includes\database.inc:225] #1 _db_query_callback(Array ([0] => %s,[1] => %s)) #2 preg_replace_callback(/(%d|%s|%%|%f|%b|%n)/, _db_query_callback, SELECT nid FROM feeds_node_item WHERE feed_nid = %d AND id = '%s' AND url = '%s') called at [J:\wamp\www\includes\database.mysql-common.inc:41] #3 db_query(SELECT nid FROM {feeds_node_item} WHERE feed_nid = %d AND id = '%s' AND url = '%s', 4090, twitterstatussen, Array ([0] => http://twitter.com/VincentVQ/statuses/16393706895)) called at [J:\wamp\www\modules\feeds\plugins\FeedsNodeProcessor.inc:283] #4 FeedsNodeProcessor->existingItemId(Array ([guid] => SimpleXMLElement Object ([0] => tag:twitter.com,2007:http://twitter.com/VincentVQ/statuses/16393706895),[published] => 1276785637,[tweet_link] => Array ([0] => http://twitter.com/VincentVQ/statuses/16393706895),[author_pic] => Array ([0] => http://a1.twimg.com/profile_images/899961538/Q_normal.jpg),[tweet_text] => SimpleXMLElement Object ([0] => VincentVQ: LVDBossche: 'Wat betekent een bonus van 2 miljoen als het bedrijf 800 miljoen winst maakt.' Lees Trends jongens&meisjes.),[tweet_html] => LVDBossche: 'Wat betekent een bonus van 2 miljoen als het bedrijf 800 miljoen winst maakt.' Lees Trends jongens&meisjes.,[updated] => 2010-06-17 14:40:37+00:00,[author_name] => Array ([0] => VincentVQ,[1] => LVDBossche,[2] => 'Wat betekent een bonus van 2 miljoen als het bedrijf 800 miljoen winst maakt.' Lees Trends jongens&meisjes.),[author_uri] => SimpleXMLElement Object ([0] => http://www.vincentvanquickenborne.be)), FeedsSource Object ([] => 4090,[] => FeedsImporter Object ([] => FeedsHTTPFetcher Object ([] => Array ([auto_detect_feeds] => ,[use_pubsubhubbub] => ,[designated_hub] => ),[] => twitterstatussen,[] => 0,[] => ,[source_config] => Array ([source] => )),[] => FeedsTwitterParser Object ([] => Array (),[] => twitterstatussen,[] => 0,[] => ,[source_config] => Array ()),[] => FeedsNodeProcessor Object ([] => Array ([content_type] => twitter_status,[update_existing] => 1,[expire] => -1,[mappings] => Array ([0] => Array ([source] => published,[target] => created,[unique] => ),[1] => Array ([source] => author_pic,[target] => field_twitterafbeelding,[unique] => ),[2] => Array ([source] => author_name,[target] => field_gebruikersnaam,[unique] => ),[3] => Array ([source] => author_uri,[target] => field_twitterauteurlink,[unique] => ),[4] => Array ([source] => tweet_text,[target] => title,[unique] => ),[5] => Array ([source] => tweet_html,[target] => body,[unique] => ),[6] => Array ([source] => tweet_html,[target] => field_twittertweet,[unique] => ),[7] => Array ([source] => tweet_link,[target] => url,[unique] => 1),[8] => Array ([source] => guid,[target] => guid,[unique] => 1))),[] => twitterstatussen,[] => 0,[] => ,[source_config] => Array ()),[] => Array ([0] => fetcher,[1] => parser,[2] => processor),[] => Array ([name] => TwitterStatussen,[description] => ,[fetcher] => Array ([plugin_key] => FeedsHTTPFetcher,[config] => Array ([auto_detect_feeds] => ,[use_pubsubhubbub] => ,[designated_hub] => )),[parser] => Array ([plugin_key] => FeedsTwitterParser,[config] => Array ()),[processor] => Array ([plugin_key] => FeedsNodeProcessor,[config] => Array ([content_type] => twitter_status,[update_existing] => 1,[expire] => -1,[mappings] => Array ([0] => Array ([source] => published,[target] => created,[unique] => ),[1] => Array ([source] => author_pic,[target] => field_twitterafbeelding,[unique] => ),[2] => Array ([source] => author_name,[target] => field_gebruikersnaam,[unique] => ),[3] => Array ([source] => author_uri,[target] => field_twitterauteurlink,[unique] => ),[4] => Array ([source] => tweet_text,[target] => title,[unique] => ),[5] => Array ([source] => tweet_html,[target] => body,[unique] => ),[6] => Array ([source] => tweet_html,[target] => field_twittertweet,[unique] => ),[7] => Array ([source] => tweet_link,[target] => url,[unique] => 1),[8] => Array ([source] => guid,[target] => guid,[unique] => 1)))),[content_type] => twitter_gebruiker,[update] => 0,[import_period] => 0,[expire_period] => 3600,[import_on_create] => 1),[] => twitterstatussen,[] => 1,[] => ),[] => FeedsHTTPBatch Object ([] => 
alex_b’s picture

Status: Active » Closed (cannot reproduce)

Closing as can't reproduce. I know I've been not very responsive on this issue, so please reopen if problems persist.