phuedx added a comment.

  I did some digging on this task during today's chores. Here's what I think I 
know:
  
  - We create the `dateModified` property using the server-local timestamp of 
the last revision (herein the "timestamp"; see here 
<https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/484fafea05436c91396e373e07b4080e315d345a/client/includes/Hooks/SkinAfterBottomScriptsHandler.php#98>)
  - //We might not have that timestamp?!//
  - We get the timestamp from `OutputPage#getRevisionTimestamp` (see here 
<https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/484fafea05436c91396e373e07b4080e315d345a/client/ClientHooks.php#405>)
  - The timestamp returned by that method is set by 
`OutputPage#setRevisionTimestamp` but there's //no fallback if the value is 
never set//
  - `OutputPage#setRevisionTimestamp` is invoked (in this context):
    - When there's a parser cache hit and the cached parser output has a 
timestamp (see here 
<https://gerrit.wikimedia.org/g/mediawiki/core/+/e2e2eb49d6581e2eab58ba843ef2db84ce06b256/includes/page/Article.php#702>)
    - When there's a parser cache miss (see here 
<https://gerrit.wikimedia.org/g/mediawiki/core/+/e2e2eb49d6581e2eab58ba843ef2db84ce06b256/includes/page/Article.php#727>)
      - The comment on that line doesn't make sense as `WikiPage#getTimestamp` 
//might// hit the DB to hydrate itself
  
  AFAICT we're seeing the result of a parser cache hit where the cached parser 
output doesn't have a timestamp.
  
  My recommendation would be to change this line 
<https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/484fafea05436c91396e373e07b4080e315d345a/client/ClientHooks.php#405>
 to:
  
    $out->getWikiPage()->getTimestamp()
  
  Or reach out on wikitech about why the above circumstance may occur.

TASK DETAIL
  https://phabricator.wikimedia.org/T209410

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: phuedx
Cc: phuedx, Tbayer, ovasileva, Niedzielski, pmiazga, Aklapper, darthmon_wmde, 
Nandana, Lahi, Gq86, GoranSMilovanovic, Chicocvenancio, QZanden, LawExplorer, 
Winter, _jensen, rosalieper, Wikidata-bugs, aude, Mbch331, Krenair
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to