Drupal RSS Feeds: How to Fix Feed Readers Pulling Duplicate Items

| | 1 min read

The Problem

A change introduced in Drupal 10 altered the way RSS feeds are generated. This includes the addition of a <time> tag nested within the <pubDate> element of each feed item. While seemingly minor, this change has unintended consequences:

  • Broken Feeds: Feed readers and systems that consume RSS feeds might incorrectly interpret the <time> tag as a modification to the item's publishing date. This can cause items to reappear as if they were newly published, disrupting feed functionality.
  • Flooded Aggregators: Feed aggregators, such as Planet Drupal, might unintentionally pull old articles from feeds. This can flood these aggregators, resulting in a cluttered and frustrating user experience.

How to Fix

There are a few ways to address this issue:

  1. Upgrade Drupal: The simplest solution is to upgrade to Drupal 10.2.1 or newer. This issue has been fixed as of this version and the problematic <time> tag will no longer be included by default.
  2. Apply a Patch: If you're unable to upgrade immediately, a patch is available to address the problem on older Drupal 10 versions. You can find the patch at https://git.drupalcode.org/project/drupal/-/merge_requests/5763.diff

Understanding the Issue

For the technical background, you can review the extensive discussion within the Drupal.org issue queue thread: https://www.drupal.org/project/drupal/issues/3383219. This thread provides developer insights and offers additional context on troubleshooting.

Note

  • Even after applying a fix, it's wise to clear any caching layers (both Drupal-side and any external caching used) to ensure feed readers see the updated feed structure.