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.
My site is taking a feed from http://www.rya.org.uk/news.rss at hourly intervals, but when the aggregator runs via cron (or even through the UI) no items are updated. I have to first remove all existing local items before the feed will update correctly via the admin menu options. After this manual remove and update, no further updates happen - eventhough the cron is running correctly. Old feed items are expired and removed correctly. The problem has existed for a while (since before 7.24). Any suggestions?
Drupal 7.31, PHP: 5.3.28, web server: Apache 2.4.9, Database: mysql 5.5.33
Comments
Comment #1
dcam CreditAttribution: dcam commentedUpdated how? Existing items aren't being changed, new items aren't being downloaded, or both?
Check the queue table in the database. Look for records with a name of aggregator_feeds. If there are any in there, it could indicate that queue items aren't being executed properly for some reason.
Comment #2
adwuk CreditAttribution: adwuk commentedCertainly new items aren't being downloaded. Difficult to say if the existing items aren't being changed as the existing items in the feed don't appear to change. The existing items certainly expire and are removed from the local cache.
I have checked the database and there are no records in the aggregator_feeds queue. I believe that the cron is running correctly. Even when I try and update the feed manually using the admin menu options it finds no new records. However, when I remove all items and then update the feed manually, it downloads all new items successfully.
Comment #3
dcam CreditAttribution: dcam commentedIt's unusual for Aggregator to have this problem. I work on a site that has Aggregator import a lot of feeds. I don't really have time to test the feed you're importing today, but I'll try when I have time. Have you tested it on a clean install of Drupal 7? Do you have any modules enabled that change Aggregator's behavior?
Comment #4
dcam CreditAttribution: dcam commentedI did test the feed on a clean install of 7.x and confirmed the issue. The feed won't update and pull in new items on a cron run or when manually updating it. The feed's items have to be removed first.
I'm not sure what is causing this problem yet. I haven't seen this behavior in Aggregator before. There could be something wrong with the feed or something about it could be causing a processing problem in Aggregator. I'll keep looking into it.
Comment #5
adwuk CreditAttribution: adwuk commentedGlad that you have been able to reproduce the error. My guess is that it is something to do with an items publish date as the aggregator, when run, reports "no new items" even when there are some. If you delete all the items, then I presume the feed aggregator simply imports all items regardless of the date. Let me know if there is anything else you need tested.
Comment #6
noovocreative CreditAttribution: noovocreative commentedI have exactly the same issue... obviously using a different feed.
Once I remove all the items then 'update' my feed is correct.
Comment #7
jelo CreditAttribution: jelo commentedI have exactly the same issue that no updates are coming through.
Is there a simple way in a custom module to trigger on a hook just before the aggregation for a specific feed is attempted to clean out all items in that feed automatically and prior to the run as an interim solution? That way it would work again while we wait for a patch.
Apparently, not many sites might use the aggregator, given that it has been a known issue and basically it doesn't function correctly.
Comment #8
noovocreative CreditAttribution: noovocreative commentedI have now switched to the feeds module and all works perfectly.
Comment #9
adwuk CreditAttribution: adwuk commentedIn my case the feed was returning an etag of "" (or at least that is what was stored in the database row for the feed). The next RSS query was using this etag and getting no data returned (304 - not changed return code). I modified line 26 of aggregator.fetcher.inc from:
if ($feed->etag) {
to:
if ($feed->etag && strcmp($feed->etag, "\\\"\\\"") !== 0) {
All seems to be working now.
Comment #10
vinothg CreditAttribution: vinothg as a volunteer commentedIf anyone still interested for the interim workaround, here is the solution for it:
Note: Make sure your hook runs before the aggregator's cron hook, adjust your module's weight
Comment #11
rajesh.vishwakarma CreditAttribution: rajesh.vishwakarma as a volunteer commentedGetting the same issue with Drupal 7.50.
Update Items button not updating the data but once delete current data it fetch the updated data from XML.
Comment #12
edvanleeuwenThis is still a problem in 7.70.