On German Wikipedia for anonymous page views the last modified bar is showing an incorrect time.
Steps to reproduce:
- Open a tab in private browsing mode.
- Go to a random page in de.wikipedia (ideally one that hasn't been edited recently): https://de.m.wikipedia.org/wiki/Spezial:Zuf%C3%A4llige_Seite
- Scroll to bottom of page
Expected: The timestamps of the last edit is somewhere in the past (when the last edit occurred) and the bar is gray
Actual: It says that the page was edited just now and it is green. When you click to the history page however this is not true.
I tried in other wikis, but I could only reproduce this issue in de.wikipedia. Also note that the timestamp in classical view is correct for all users.
On Nov 15 history bar is green suggesting it's just been edited.
Last edit however says it hasn't been edited since April:
Possibly related: The history link is also not showing at all on certain anonymous page views: T180116
Developer notes
I can replicate this only on German Wikipedia
The timestamp is provided by:
$this->getOutput()->getRevisionTimestamp();
Somehow that is being reported incorrectly for anonymous page views
It is possible something on German Wikipedia is calling setRevisionTimestamp in an incorrect way:
https://github.com/search?q=org%3Awikimedia+setRevisionTimestamp&type=Code
In core:
$timestamp = $this->getOutput()->getRevisionTimestamp(); # No cached timestamp, load it from the database if ( $timestamp === null ) { $timestamp = Revision::getTimestampFromId( $this->getTitle(), $this->getRevisionId() ); }
In Minerva
$timestamp = $this->getOutput()->getRevisionTimestamp(); 'data-timestamp' => $isMainPage ? '' : wfTimestamp( TS_UNIX, $timestamp ),
Given the timestamp is not null or empty string, it seems unrelated to the call to getTimestampFromId
@Tgr suggests that we should add the fallback step to Minerva and see if that remedies the problem - https://phabricator.wikimedia.org/T180103#3757401
Additional info from @EddieGP
I browsed a page on dewp this morning and was surprised by the footer bar saying "Last edited 10 hours ago by EddieGP". The relevant page is https://de.m.wikipedia.org/wiki/Digitalfunk_der_Beh%C3%B6rden_und_Organisationen_mit_Sicherheitsaufgaben . I indeed am the last one who edited that page, but that was four month ago (by July), not yesterday. So I looked into it a bit and saw that my phone is served a different time stamp for the "last edited" field than my laptop (when using mobile view). Looking on the html source on my laptop, within "footer div.last-modified-bar div.content div.last-modifier-tagline":
<a href="/wiki/Spezial:Versionsgeschichte/Digitalfunk_der_Beh%C3%B6rden_und_Organisationen_mit_Sicherheitsaufgaben" data-user-name="EddieGP" data-user-gender="male" data-timestamp="1500822350">Zuletzt bearbeitet am 2017-07-23 um 15:05:50</a>
On my phone, it looks like this: | Turning off js, so I can see exactly at which time it says to be last edited: | Looking into the source code on my mobile, I get the timestamp "1510680482": |
My phone is a oneplus2, and I'm on Firefox 56.0, Android 7.1.2. I could reprodiuce this on my phone with Chrome 62.0.3202.84.