Steps to replicate the issue (as an example, as of right now)
- Navigate to https://en.wikipedia.org/api/rest_v1/page/mobile-html/India_national_cricket_team (the mobile-html page for this article's canonical title). Note that the ETag response header states that the revision being used is 1313327976, which (at time of writing) is indeed the current revision of the article.
- Navigate to the mobile-html page for the title Indian_cricketer (which onwiki is a redirect to this article): https://en.wikipedia.org/api/rest_v1/page/mobile-html/Indian_cricketer.
What happens?
The mobile-html page for this redirected title returns an outdated version of the target article. The ETag response header says that the revision being used is 1312522885, a revision from 4+ days ago that has had 14 revisions come after it (as of the time of writing).
What should have happened instead?
Presumably, the endpoint should have either returned non-outdated content, or done something else (e.g. redirect to the endpoint for the article's canonical title).
Impact
Judging by a user-report here, this might mean that users of the Wikipedia apps who click on a wikilink to a redirect may be shown an outdated version of the target page.
Notes on reproducibility
I coded together an extremely hacky piece of JavaScript to run in my browser's console, that:
(a) uses the MediaWiki Action API to fetch a list of articles that have last been edited between 0.5hrs-1hr ago (in addition to those articles' most recent revision IDs, & the list of titles that redirect to those articles);
(b) queries the mobile-html endpoint for some of the redirect titles returned by the Action API; and
(c) compares the most recent revision ID of the target article (according to the Action API) to the revision ID of the content returned by mobile-html in response to the redirect title (according to its ETag header).
Running that script just now, it apparently found 11 mismatches (i.e., where the mobile-html ETag revID is different to the target article's latest revID) from querying the mobile-html endpoint for 51 redirect titles. (Disclaimer: I didn't independently verify each of these results, and I also have no idea how representative this is compared to the general scale.)
Other information/Notes
- Boldly tagging Content-Transform-Team, as they've been tagged in previous issues for Page Content Service returning outdated content (e.g. T398243#10964438)
- I don't know whether this applies to endpoints other than page/mobile-html -- it might do, but I haven't tested them :)
- I don't know whether this is the same issue described in tasks such as T398243 or not (given that I can reproduce the issue using redirects to an article, but I haven't currently reproduced the issue when using an article's canonical title). Filing a new task for this just in case.
- Also tagging the Wikipedia app projects here for visibility (as there's a report of this happening on the iOS app, and I assume that it'd occur on the Android app as well).