Page MenuHomePhabricator

"Last modified at" timestamp weirdness
Closed, ResolvedPublic

Description

https://meta.wikimedia.org/wiki/WMF_Metrics_and_activities_meetings/Quarterly_reviews says "This page was last modified on 28 August 2015, at 22:36 (UTC)." when I'm logged out.

https://meta.wikimedia.org/wiki/WMF_Metrics_and_activities_meetings/Quarterly_reviews says "This page was last modified on 15 September 2015, at 01:28 (UTC)." when I'm logged in (presumably bypassing the cache layer). I made a null edit to this page a few minutes ago, so when I append a cache-buster, https://meta.wikimedia.org/wiki/WMF_Metrics_and_activities_meetings/Quarterly_reviews?1 says "This page was last modified on 15 September 2015, at 05:28 (UTC)." The cache-buster behavior isn't totally surprising, though the timestamp is still seemingly wrong.

What gets weirder is that https://meta.wikimedia.org/wiki/WMF_Metrics_and_activities_meetings/Quarterly_reviews?uselang=qqx says "(lastmodifiedat: 10 (august) 2015, 04:15)". And other languages I checked such as https://meta.wikimedia.org/wiki/WMF_Metrics_and_activities_meetings/Quarterly_reviews?uselang=de say "Diese Seite wurde zuletzt am 10. August 2015 um 04:15 Uhr geändert." This is the expected date, as it matches the date of the latest edit to the page.

04:15, 10 August 2015‎ Tbayer (WMF) (talk | contribs)‎ . . (18,121 bytes) (+1,364)‎ . . (add more history [...])

We're seeing two weird behaviors here:

  1. Null edits shouldn't affect the "last modified at" timestamp, as far as I know. Looking at includes/skins/Skin.php we see:
$timestamp = $this->getOutput()->getRevisionTimestamp();

The timestamp should always match the date of the latest edit or action to the page.

  1. The timestamp shouldn't be changing based on the output language. The timestamp should be the same and the surrounding interface messages should be the only change. ?uselang=qqx and ?uselang=de have the correct timestamp, while ?uselang=en has an incorrect timestamp.

It feels like perhaps the "get latest revision" logic has been weirdly tied to output language and maybe cached at the wrong value somewhere? I'm just spitballing here.

Details

Related Gerrit Patches:

Event Timeline

MZMcBride raised the priority of this task from to Needs Triage.
MZMcBride updated the task description. (Show Details)
MZMcBride added a project: MediaWiki-General.
MZMcBride added subscribers: MZMcBride, Tbayer, Krenair and 2 others.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 15 2015, 5:46 AM

I suspect rMW7480b9250cbb: Avoid excess master queries in getTimestampFromId is at fault. I can't reproduce it locally, but that would make sense because it's a master/slave issue.

MZMcBride set Security to None.Sep 15 2015, 1:38 PM
MZMcBride added a subscriber: aaron.

@aaron: Any thoughts here?

Change 238987 had a related patch set uploaded (by Aaron Schulz):
Fixed "last modified" date fudging on null edit

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

Change 238987 merged by jenkins-bot:
Fixed "last modified" date fudging on null edit

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

aaron closed this task as Resolved.Sep 21 2015, 5:41 PM
aaron claimed this task.