Skip to content

#359 - Feeds: stable GUID and publish date in RSS items - #452

Open
miromichalicka wants to merge 1 commit into
developfrom
claude/slack-duplicate-notifications-c7b1d6
Open

miromichalicka wants to merge 1 commit into
developfrom
claude/slack-duplicate-notifications-c7b1d6

Conversation

@miromichalicka

Copy link
Copy Markdown
Member

Closes #359.

Problem

/feed/articles.xml and /feed/forum.xml used the aliased node URL as the item <guid>. The pathauto patterns are clanky/[node:title] and forum/.../[node:title], with update_action: 2, so a title change creates a new alias. That gives a new GUID, and the Slack RSS app posts the article again.

Change (views.view.feeds.yml, both feed displays)

  • GUID: a new hidden nid field, rewritten to <nid> at https://www.drupal.cz, with isPermaLink="false". This is the same format core's node_rss row uses for /rss.xml. <link> still points to the alias.
  • pubDate: uses the created date instead of changed, so an edit doesn't make the item look new. The format is now RFC 2822 (r), which RSS requires; before it was ISO 8601.

Verified locally (DDEV, temporary article that was deleted afterwards)

Before, the GUID was https://drupalcz.ddev.site/clanky/puvodni-titulek-359. After this change:

link guid pubDate
original title /clanky/puvodni-titulek-359 2 at https://www.drupal.cz Sat, 24 Oct 2026 04:12:50 +0200
after title change /clanky/zmeneny-titulek-359 2 at https://www.drupal.cz (same) same

The forum feed renders the same way: <guid isPermaLink="false">3 at https://www.drupal.cz</guid>.

⚠️ On deploy

The GUID format changes once, so Slack will see the current 10 items in each feed as new and post them again one time. To avoid that, remove the RSS subscriptions in Slack before deploy and add them back afterwards.

🤖 Generated with Claude Code

The article and forum feeds used the aliased node URL as the item GUID.
Pathauto regenerates the alias on title change, so readers (Slack RSS)
saw a new item and re-posted it. Use "<nid> at https://www.drupal.cz"
(same format as core's node_rss row) with isPermaLink=false, and use the
created date in RFC 2822 format for pubDate instead of the changed date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feeds publikuju duplicitny obsah po zmene aliasu

1 participant