Page MenuHomePhabricator

"Last modified at" timestamp weirdness
Closed, ResolvedPublic

Description says "This page was last modified on 28 August 2015, at 22:36 (UTC)." when I'm logged out. 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, 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 says "(lastmodifiedat: 10 (august) 2015, 04:15)". And other languages I checked such as 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.

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.

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 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

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

aaron claimed this task.