Page MenuHomePhabricator

All RSS feed items have the same URL
Closed, ResolvedPublicBUG REPORT

Description

All RSS items in the watchlist and other MediaWiki feeds have the same URL. For example, my watchlist on enwikipedia starts with:

<channel>
		<title>Wikipedia - Watchlist [en]</title>
		<link>https://en.wikipedia.org/wiki/Special:Watchlist</link>
		<description>Watchlist</description>
		<language>en</language>
		<generator>MediaWiki 1.43.0-wmf.22</generator>
		<lastBuildDate>Fri, 13 Sep 2024 00:49:28 GMT</lastBuildDate>
		<item>
			<title>Wikipedia:Village pump (technical)</title>
			<link>https://en.wikipedia.org/wiki/Special:Watchlist</link>
			<guid isPermaLink="false">https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&amp;diff=1245437892</guid>
			<description>/* New pages highlight color changed */ new section (Maile66)</description>
			<pubDate>Fri, 13 Sep 2024 00:25:20 GMT</pubDate>
			<dc:creator>Maile66</dc:creator>
			
		</item>
		<item>
			<title>Wikipedia:Village pump (technical)</title>
			<link>https://en.wikipedia.org/wiki/Special:Watchlist</link>
			<guid isPermaLink="false">https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&amp;diff=1245435874</guid>
			<description>/* IP editor(s) cannot edit talk pages */ Reply (Swan2024)</description>
			<pubDate>Fri, 13 Sep 2024 00:11:23 GMT</pubDate>
			<dc:creator>Swan2024</dc:creator>
			
		</item>

The <link>https://en.wikipedia.org/wiki/Special:Watchlist</link> should have the URL of the Village pump rather than the Watchlist (the latter is correctly the feed's <link> value).

Atom feeds do not have this bug.

Event Timeline

Change #1072641 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Fix typo in RSSFeed::outItem() for feed item URL

https://gerrit.wikimedia.org/r/1072641

Change #1072641 merged by jenkins-bot:

[mediawiki/core@master] Fix typo in RSSFeed::outItem() for feed item URL

https://gerrit.wikimedia.org/r/1072641

This is happened due to a copy paste failure in my patch and I'm sorry about that but I like to make things more resilient as feed related tests seem nonexistent at the moment so I'm trying to write a patch at least to check this very issue won't regress again in future in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1072776 which is very initial at the moment and I think I need your help. Thanks

Update: Turned out unit testing there wasn't that easy and it needed some integration test which I wasn't familiar with writing one much.

Ebrahim assigned this task to Samwilson.