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.
Allow aggregator feed items to never be discarded, by adding an additional option in 'Discard news items older than:'
Comment | File | Size | Author |
---|---|---|---|
#19 | 60468-19-aggregator-never-discard.patch | 2.74 KB | akahn |
#14 | 60468-14_never_discard.patch | 2.44 KB | alex_b |
#10 | jamesan_60468-3.patch | 1.62 KB | JamesAn |
#8 | jamesan_60468-2.patch | 1.59 KB | JamesAn |
#5 | jamesan_60468.patch | 1.51 KB | JamesAn |
Comments
Comment #1
LAsan CreditAttribution: LAsan commentedApplies to current version?
Comment #2
lolandese CreditAttribution: lolandese commentedIs there already a patch to accomplish this (D6)?
Comment #3
alex_b CreditAttribution: alex_b commentedNovice task.
Comment #4
sethcohn CreditAttribution: sethcohn commentedThe fix via form_alter
D5:
D6 (and D7?):
Comment #5
JamesAn CreditAttribution: JamesAn commentedI've added a 'never' option to the 'Discard news items older than' field.
When aggregator_expire is called, it returns without discarding if the 'never' option is selected.
Comment #6
mr.baileysThanks for working on this JamesAn!
Strict technical review (haven't tested the functionality):
Setting back to CNW for #1 and #2. #3 and #4 are just my preference, so feel free to ignore ;)
Comment #7
mr.baileysForgot to actually set it to CNW...
Comment #8
JamesAn CreditAttribution: JamesAn commentedThanks for the review. For #4, I used $aggregator_clear simply because the variable name in Drupal is 'aggregator_clear'. I've tweaked the patch by hand.. let's hope I didn't mess it up! *fingers-crossed*
Comment #10
JamesAn CreditAttribution: JamesAn commentedOk, ok.. I re-rolled the patch.. -.-" This should work now.
Comment #12
JamesAn CreditAttribution: JamesAn commentedThat's strange. The patch passed last time I checked. Let's re-test!
Comment #13
catchI'm wondering if we should define a constant for NEVER rather than using 0. Otherwise this looks good to me. Test bot could use a nudge.
Comment #14
alex_b CreditAttribution: alex_b commentedAgreed. 0 should be a constant for clarity's sake: Introduced AGGREGATOR_CLEAR_NEVER and rerolled.
Comment #15
alex_b CreditAttribution: alex_b commentedComment #16
alex_b CreditAttribution: alex_b commentedNudging the bot.
Comment #17
Dries CreditAttribution: Dries commentedWe use 0 as never (or unlimited) in other places, so we could consider making it one (or two) generic constants. I'm happy to do that in a follow-up patch though.
Comment #18
BerdirIf you have multiple arguments, they should be splitted up to multiple lines, see #394586-10: DBTNG: Trigger module ( A)
Comment #19
akahn CreditAttribution: akahn commentedCorrecting db_query() indenting.
Comment #20
akahn CreditAttribution: akahn commentedGiving this a spin and a more careful look, I think it's good to go.
Comment #21
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!
Comment #23
inspirited CreditAttribution: inspirited commentedI read your post about how to add a "never" option to the aggregator in the discard setting. I was wondering if you could explail a little more or point me in the right direction. You posted a Patch but I wasn't sure how to implement or install it. I'm interested in having my aggregator keep all of my posts. I would greatly appreciated your help. Thank you for your time. I'm a newb to Drupal but follow directions really well :)
Sincerely,
John
Comment #24
mr.baileys@inspirited: Information about applying patches. However, the patches in this thread are specific to Drupal 7, and it's unlikely that you'll be able to make these work on D6 without some tweaking.
Since this feature was implemented in D7, and new features are not backported to earlier versions, this issue was closed, and it is generally not done to re-open closed issues so I've changed the status back to closed.
If you would still like this feature in D6 you might find help through one of the support channels, especially the forums or irc.
Comment #25
djschoone CreditAttribution: djschoone commentedStrange this didn't make it to any official release yet. I'm happy with this workaround sethcohn made (#60468-11: Allow aggregator feed items to never be discarded. Rewrote it to D6:
Comment #26
wavesailor CreditAttribution: wavesailor as a volunteer commentedAny idea how I can get the "Never 5 years" into Drupal 7?
I created a custom module but it does not work - copied it from Drupal 6 code here https://www.drupal.org/node/21959#comment-2873140
Created a
aggregator_settings.module
andaggregator_settings.info
file