Nodes are not updated properly when feed is refreshed
| 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 |
Jump to:
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.
| Attachment | Size |
|---|---|
| feedparser_updatenodes.patch | 8.27 KB |

#1
Code looks good to me. Tested here and it appears to work correctly.
#2
Wanted to but it fails currently.
patching file feedaggregator_node.moduleHunk #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
@budda: you must have an error in your copy of the patch. This applied for me.