Nodes are not updated properly when feed is refreshed

geodaniel - June 20, 2007 - 15:17
Project:Feedparser
Version:4.7.x-1.x-dev
Component:feedaggregator_node
Category:bug report
Priority:normal
Assigned:geodaniel
Status:reviewed & tested by the community
Description

When items are updated in a feed and the feed is refreshed, that new information should be reflected. A new revision is created as expected, but no actual changes are recorded. The attached patch changes the way the old and new node arrays are merged together, and should fix the issue (as well as tidying up the line spacing in that section). It seems to be working for me as expected now.

Two more things I noticed whilst debugging this: I don't think revisions should be created if the item wasn't actually updated, and when looking at aggregator/sources/2 page, the nodes don't show the right information (they show the correct title but an old version of the body for some reason). Looking at the node itself, it does show the correct info. I've not patched either of these yet, but the main thing is the patch to get the nodes updating at least.

AttachmentSize
feedparser_updatenodes.patch8.27 KB

#1

Chris Johnson - June 22, 2007 - 08:53
Status:needs review» reviewed & tested by the community

Code looks good to me. Tested here and it appears to work correctly.

#2

budda - August 20, 2007 - 23:00

Wanted to but it fails currently.

patching file feedaggregator_node.module
Hunk #1 FAILED at 149.
Hunk #2 FAILED at 200.
Hunk #3 FAILED at 273.
3 out of 3 hunks FAILED -- saving rejects to file feedaggregator_node.module.rej

Apart from the cleanup of the indenting, whats the fix? is it the $node = array_merge($node, $base_node); ?

#3

earnie - August 23, 2007 - 00:44

@budda: you must have an error in your copy of the patch. This applied for me.

 
 

Drupal is a registered trademark of Dries Buytaert.