>The Wikipedia watchlist shows not only changes to articles, but also certain log entries, such as deleting revisions and setting up pending changes. All these entries are also included in the RSS feed, but their <link> and <guid> fields always have the same value: https://en.wikipedia.org/w/index.php?title=article_name&diff=0, obviously because these entries are not diffs.
>Therefore, I can end up with multiple <item>s with the same <guid> in my feed, which breaks most RSS readers in some way. In fact, in my current feed, I have three items for the same article with the same <guid>, all having diff=0.
>For example, here's an entry for the Ha! Ha! Pyramid article, with which I was involved yesterday:
> <title>Ha! Ha! Pyramid</title>
> <guid isPermaLink="false">https://en.wikipedia.org/w/index.php?title=Ha!_Ha!_Pyramid&diff=0</guid>
> <description>purely disruptive (Drmies)</description>
> <pubDate>Thu, 22 Nov 2018 15:24:00 GMT</pubDate>
>The source of this entry can be seen in the logs for that article.
>I've had a quick look at the archives, but didn't find anything. Is this already known? Should I file a bug in phabricator for this? Isa (talk) 07:21, 23 November 2018 (UTC)
So instead we should probably link to either Special:redirect/logid/<logid> or the page that that page would redirect to.
This is potentially an appropriate scope for a gci task.
When you view an RSS feed for a watchlist, and your watchlist has a log entry in it (For example if somebody moves the page, or protects the page), the `<link>` tag and the `<guid>` tag are incorrect. They should instead link to something like https://en.wikipedia.org/w/index.php?title=Special%3ALog&logid=1234 (assuming the logid number is `1234`)
The watchlist feed is from `feedwatchlist` action of the api.
We have to modify `ApiFeedWatchlist::createFeedItem` in the file `includes/api/ApiFeedWatchlist.php` to properly handle log entries. See `ApiQueryWatchlist::ApiFeedWatchlist` for details of what type of things can be passed here. In particular you need to handle the logging type of entry better.
The main part that needs to be changed is ApiFeedWatchlist::createFeedItemo complete this task:
* Add some pages to your watchlist on your test wiki (the blue star icon)
* Protect them (or do other things to them) in order to generate some log actions
* Look at `action=apifeedwatchlist&feedformat=rss` in the api. Right now it assumes that all the results from action=watchlist are page edits, which isn't true. See ApiQueryWatchlist::ApiFeedWatchlist for what sort of outputs could be given to createFeedItem. In particular you need to handle the logging type of entry better.Verify the bug is present
* Fix `ApiFeedWatchlist::createFeedItem`
* Test again to make sure things are fixed.
* Upload your patch to Wikimedia Gerrit
* Check to make sure that jenkins bot does not flag any errors.