Sometimes Feeds processes the same node more than once in a single import operation. (Whether that's supposed to be possible or not I don't know, but that's not my primary concern.) For example, I have a case where four different nodes get updated, but each one gets processed 2-3 times, incrementing the update counter each time so that it reports ten nodes updated afterward. There are, in fact, ten update operations, but only four distinct nodes get updated. So unless someone knows that it shouldn't be possible to process the same node multiple times in a single import operation and wants to fix that, we should prevent the counter from counting the same nodes more than once. Such is an easy task. Preliminary patch to follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | feeds-inflated-update-count-1979942-1.patch | 867 bytes | traviscarden |
Comments
Comment #1
traviscarden commentedThis is a knowingly incomplete patch. It just fixes the problem in
plugins/FeedsNodeProcessor.inc; the same problem (and probably very similar ones) exist elsewhere. It scratches where I happen to itch. Hopefully it'll help somebody else.Comment #2
twistor commentedThis would have to go into 7.x first.
I'm reluctant to accept this. It can hide a misconfigured feed. Perhaps the wording can be corrected to reflect update operations vs. different nodes.
Comment #3
traviscarden commentedI have no complaint with your reluctance, @twistor—I think you have a valid concern. I actually discovered since posting this that my source data has some duplicate GUIDs and that's why nodes are getting updated multiple times. That constitutes an error in the source data in my case, but I can easily imagine use cases where it would be a valid scenario; so it probably shouldn't get special handling as if it's an error condition. Making the status message language a little more precise might be the best solution. Perhaps something along the lines of "Made X updates to Y @type nodes."?
Comment #4
bluegeek9 commentedDrupal 7 reached end of life and the D7 version of Feeds is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues.
If you still have questions about using Feeds on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #feeds channel on Drupal Slack.
If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome!