FeedAPI erase the link feed field.

cristian100 - October 16, 2009 - 16:38
Project:FeedAPI
Version:6.x-1.8
Component:Code feedapi (core module)
Category:bug report
Priority:critical
Assigned:cristian100
Status:closed
Description

I found that when we update a node created through feedAPI, the feedAPI hook it, and in the line #959 it try to update the table feedapi:

db_query("UPDATE {feedapi} SET
url = '%s',
feed_type = '%s',
processors = '%s',
parsers = '%s',
link = '%s',
next_refresh_time = %d
WHERE vid = %d",
isset($node->feed->url) ? $node->feed->url : $node->feedapi['feedapi_url'],
isset($node->feed->feed_type) ? $node->feed->feed_type : '',
isset($node->feed->processors) ? serialize($node->feed->processors) : serialize($old_config->feed->processors),
isset($node->feed->parsers) ? serialize($node->feed->parsers) : serialize($old_config->feed->parsers),
isset($node->feed->options->link) ? $node->feed->options->link : '',
$next_refresh_time,
$node->vid
);

in the moment that it tries to get the actual link it faild:
isset($node->feed->options->link) ? $node->feed->options->link : ''

because the $node->feed->options doesnt even exists, so it cant find the link value and put "" in the query that actually erase the value.

For now, what I did in order to not alter the feedAPI, was that i use the hook_nodeapi in my module, and before to save the node, i did this:

$node->feed->options->link = $node->feed->link

in this way, this value can be obtained from $node->feed->options->link, and the feedAPI module can saved it correctly like it is expecting to find that value.

#1

vacilando - October 17, 2009 - 11:40

Same problem, subscribing.

#2

Summit - October 22, 2009 - 21:23

Subscribing, greetings, Martijn

#3

Aron Novak - October 26, 2009 - 20:49
Status:active» needs review

Thanks for the really exact bug description!
Basically you supplied the patch, in an indirect way also :)
Can you confirm that the patch below helps?

AttachmentSize
606564_erase_link.patch 894 bytes

#4

DamienMcKenna - October 27, 2009 - 11:35

This worked for me and it also resolves #614108: Could not refresh feed error.

#5

DamienMcKenna - October 27, 2009 - 11:39
Status:needs review» reviewed & tested by the community

#6

Aron Novak - October 27, 2009 - 15:56
Status:reviewed & tested by the community» fixed

Committed! Thank you for the cooperation.

#7

System Message - November 10, 2009 - 16:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.