Closed (outdated)
Project:
Feeds
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2011 at 22:33 UTC
Updated:
16 Jun 2016 at 21:52 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
imclean commentedShould probably add a notification.
Comment #2
imclean commentedThis leads to some interface issues, "Purge existing records" will override "Replace existing records". Would a comment along those lines be enough?
Comment #3
imclean commentedIt wasn't particularly hard to review.
Comment #4
math-hew commentedBeautiful. This just saved me more headaches than you know.
Comment #5
math-hew commentedIt doesn't look like this patch made it into beta11 - will it be included in future versions?
Comment #6
imclean commentedGood question. Given that only 2 of us have posted in this issue I guess it isn't really a priority for others. NicolasH has expressed support in another issue: http://drupal.org/node/661314#comment-3914908
New features are probably being added to the 7 version then backported if required.
Comment #7
imclean commentedI'm just wondering if it's worth pursuing this in its current form. We make extensive use of this function and it isn't ideal patching after each update.
The data module hasn't been ported to Drupal 7 yet and may never be. Is this feature ever likely to be considered for Feeds?
Comment #8
imclean commentedData module out for D7: http://drupal.org/project/data
See also: #1420490: Data Processor for 7.x
Comment #9
twistor commentedI wouldn't hold this issue up by requiring a FeedsDataProcessor for 7.x.
But, as noted in #2, this configuration option will interfere with updating/replacing existing records. It seems to me that it should be another option in that select.
Is this only a feature that makes sense for data.module? I think that may be the case, since we can't really truncate drupal tables at will. But, I would like to confirm this.
Comment #10
PatchRanger commentedPurging existing data (or any other action you like) before import could be done by another way : using "Before import" event and the power of Rules module. See #1744570: Invoke Before import event before start import for more details.
I think it is more generic (and it means reusable) way to achieve your goal rather than implementing new special option for this special case, what do you think?
Marking this as fixed if nobody would mind.
Comment #11
imclean commentedThe Rules addition sounds useful and flexible.
In this case, I think creating a rule for such simple, basic feature when it can be easily factored in to the current code and UI is overkill.
Also, despite the wording of the issue "Purge existing Data before import" , the purge actually happens after the data has been imported but before it has been saved. This keeps the old records in the event the import fails.
Along the lines of the node processor settings, this patch changes the "Replace existing" option to be radios and adds the "Purge existing" option.
Comment #12
imclean commentedRemoved "before import" from the patch.
@twistor, this does only seem to make sense for the Data module. For nodes things get a bit more complicated. The synch/cache issue has some good discussion but seems to be a bit all over the place.
Comment #13
twistor commented