Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would be useful to have the option to automatically delete feed items when their associated feed importer node is deleted. This should be straightforward with hook_nodeapi()
. Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#3 | 954814_3.patch | 2.2 KB | Will White |
#1 | 954814_1.patch | 2.21 KB | Will White |
Comments
Comment #1
Will White CreditAttribution: Will White commentedThis patch add an option to the data processor. Similar options could be added to processors. During the "delete"
op
,hook_nodeapi()
now checks for this option and runsclear()
on the source if the option is true.Comment #2
alex_b CreditAttribution: alex_b commentedLooks good.
A) Can we call this option 'delete_with_source' or sth similarily descriptive (not delete_with_node though)?
B) Title should be much shorter "Delete with source", description can stay the same.
This is surprisingly simple!
Comment #3
Will White CreditAttribution: Will White commentedHi Alex,
Here is an updated patch with the changes you suggested.
Thanks,
Will
Comment #4
alex_b CreditAttribution: alex_b commentedWill... we should cover this with a test.
This functionality is going to go into the next MN release and it's going to be one of these things that we won't notice if it breaks. The test should be *very quick* to write. If you have any questions around it, please poke me.
Comment #5
twistor CreditAttribution: twistor commentedHaha... #608844: Optionally delete feed items with feed nodes
Comment #6
Will White CreditAttribution: Will White commentedWow your patch is almost identical.
Comment #7
hellomobe CreditAttribution: hellomobe commentedMay I have assistance with how to add this to 7.x 2.x version.