Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
aggregator.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2008 at 18:11 UTC
Updated:
22 Jul 2010 at 18:58 UTC
I'm trying to use the Aggregator to create a block of eight items from an infrequently updated feed. The problem is that only two of them are newer than 16 weeks, which is the fixed upper limit for how long Drupal will not discard the items. By the time some new items appear, probably some of the existing ones will be older than 16 weeks, and get discarded. I'm stuck with this lame, underpopulated block.
The 16-week limit strikes me as arbitrary, and it's in a core module that users are encouraged not to hack. If we're worried about people accidentally importing a zillion RSS items, make the *default* 2 weeks or something, but please make the option to hold on to more data available.
Comments
Comment #1
ultimateboy commentedNew features are only applied to dev.
Comment #2
alex_b commented#60468: Allow aggregator feed items to never be discarded
Comment #3
dsgirard commentedfor those who don't mind hacking core, add values of your choice to this line (~ line 56) of aggregator.admin.inc:
Comment #4
amanfree commentedeven on doing as u said the matter is not resolved dear.
Comment #5
amanfree commentedplease do at line 225 instead of 57 no line as suggested above by my fellow friend
Comment #6
pfahlr commentedI have a hack for this that doesn't require core modifications. Edit "aggregator_clear" in the variable table, set to whatever you like. However, every time you edit the aggregator settings, you'll need to manually update the variable table.
There should definitely be an "unlimited" option. Sure it may be logical to think that syndicated content should fall off after it's out of date, but in the real world there are clients, and sometimes their demands are illogical.
Comment #7
flaviovs commentedIn the meantime, while the fix is not in core and you want to avoid hacking the sources, you can use a small module that do the trick of allowing feed items to exist "forever". Just create a small module (I called mine "Unlimit Aggregator" --
unagg) and put the following code on it:Now you'll be able to select a very long time for expiration of your RSS items.
p.s.: There's a bug in the code above. Maybe 2,147,483,647 seconds is not exactly 1 trillion weeks, but you got the point. Figuring out the exact number of weeks and fixing the code is left as an exercise to the reader.