Page MenuHomePhabricator

AbstractFormatter.php: Undefined index: time
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request ID: W6JdJgrAAEAAACtvkasAAADG

message
[{exception_id}] {exception_url}   ErrorException from line 77 of /srv/mediawiki/php-1.32.0-wmf.20/extensions/Flow/includes/Formatter/AbstractFormatter.php: PHP Notice: Undefined index: time
stacktrace
#0 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Flow/includes/Formatter/AbstractFormatter.php(77): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Flow/includes/Formatter/ChangesListFormatter.php(169): Flow\Formatter\AbstractFormatter->formatTimestamp(array, string)
#2 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Flow/Hooks.php(561): Flow\Formatter\ChangesListFormatter->getTimestampLink(Flow\Formatter\RecentChangesRow, EnhancedChangesList)
#3 /srv/mediawiki/php-1.32.0-wmf.20/extensions/Flow/Hooks.php(532): FlowHooks::modifyChangesListLine(EnhancedChangesList, array, RCCacheEntry, array)
#4 /srv/mediawiki/php-1.32.0-wmf.20/includes/Hooks.php(174): FlowHooks::onEnhancedChangesListModifyLineData(EnhancedChangesList, array, array, RCCacheEntry, array, array)
#5 /srv/mediawiki/php-1.32.0-wmf.20/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#6 /srv/mediawiki/php-1.32.0-wmf.20/includes/changes/EnhancedChangesList.php(470): Hooks::run(string, array)
#7 /srv/mediawiki/php-1.32.0-wmf.20/includes/changes/EnhancedChangesList.php(271): EnhancedChangesList->getLineData(array, RCCacheEntry, array)
#8 /srv/mediawiki/php-1.32.0-wmf.20/includes/changes/EnhancedChangesList.php(802): EnhancedChangesList->recentChangesBlockGroup(array)
#9 /srv/mediawiki/php-1.32.0-wmf.20/includes/changes/EnhancedChangesList.php(819): EnhancedChangesList->recentChangesBlock()
#10 /srv/mediawiki/php-1.32.0-wmf.20/includes/specials/SpecialRecentchanges.php(459): EnhancedChangesList->endRecentChangesList()
#11 /srv/mediawiki/php-1.32.0-wmf.20/includes/specialpage/ChangesListSpecialPage.php(1610): SpecialRecentChanges->outputChangesList(Wikimedia\Rdbms\ResultWrapper, FormOptions)
#12 /srv/mediawiki/php-1.32.0-wmf.20/includes/specialpage/ChangesListSpecialPage.php(675): ChangesListSpecialPage->webOutput(Wikimedia\Rdbms\ResultWrapper, FormOptions)
#13 /srv/mediawiki/php-1.32.0-wmf.20/includes/specials/SpecialRecentchanges.php(167): ChangesListSpecialPage->execute(NULL)
#14 /srv/mediawiki/php-1.32.0-wmf.20/includes/specialpage/SpecialPage.php(569): SpecialRecentChanges->execute(NULL)
#15 /srv/mediawiki/php-1.32.0-wmf.20/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(NULL)
#16 /srv/mediawiki/php-1.32.0-wmf.20/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#17 /srv/mediawiki/php-1.32.0-wmf.20/includes/MediaWiki.php(868): MediaWiki->performRequest()
#18 /srv/mediawiki/php-1.32.0-wmf.20/includes/MediaWiki.php(525): MediaWiki->main()
#19 /srv/mediawiki/php-1.32.0-wmf.20/index.php(42): MediaWiki->run()
#20 /srv/mediawiki/w/index.php(3): include(string)
#21 {main}

Notes

I can reproduce this in mw-vagrant by creating a flow topic on the admin's talk page, then visiting Special:RecentChanges. Locally I see that $data['dateFormats'] is an empty array.

Event Timeline

Still seen. A recent sample:

  • Request ID: XSERCQpAMFUAAD4m7RUAAACI
  • Request URL: mediawikiwiki /w/index.php?title=Special:Watchlist&watchlistactivity=unseen&hidemyself=1&hidepreviousrevisions=1&translations=filter&urlversion=2
message
PHP Notice: Undefined index: time
trace
#0 /srv/mediawiki/php-1.34.0-wmf.11/extensions/Flow/includes/Formatter/AbstractFormatter.php(77): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.34.0-wmf.11/extensions/Flow/includes/Formatter/ChangesListFormatter.php(169): Flow\Formatter\AbstractFormatter->formatTimestamp(array, string)
#2 /srv/mediawiki/php-1.34.0-wmf.11/extensions/Flow/Hooks.php(556): Flow\Formatter\ChangesListFormatter->getTimestampLink(Flow\Formatter\RecentChangesRow, EnhancedChangesList)
#3 /srv/mediawiki/php-1.34.0-wmf.11/extensions/Flow/Hooks.php(527): FlowHooks::modifyChangesListLine(EnhancedChangesList, array, RCCacheEntry, array)
#4 /srv/mediawiki/php-1.34.0-wmf.11/includes/Hooks.php(174): FlowHooks::onEnhancedChangesListModifyLineData(EnhancedChangesList, array, array, RCCacheEntry, array, array)
#5 /srv/mediawiki/php-1.34.0-wmf.11/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#6 /srv/mediawiki/php-1.34.0-wmf.11/includes/changes/EnhancedChangesList.php(468): Hooks::run(string, array)
#7 /srv/mediawiki/php-1.34.0-wmf.11/includes/changes/EnhancedChangesList.php(271): EnhancedChangesList->getLineData(array, RCCacheEntry, array)
#8 /srv/mediawiki/php-1.34.0-wmf.11/includes/changes/EnhancedChangesList.php(824): EnhancedChangesList->recentChangesBlockGroup(array)
#9 /srv/mediawiki/php-1.34.0-wmf.11/includes/changes/EnhancedChangesList.php(841): EnhancedChangesList->recentChangesBlock()
#10 /srv/mediawiki/php-1.34.0-wmf.11/includes/specials/SpecialWatchlist.php(565): EnhancedChangesList->endRecentChangesList()
#11 /srv/mediawiki/php-1.34.0-wmf.11/includes/specialpage/ChangesListSpecialPage.php(1575): SpecialWatchlist->outputChangesList(Wikimedia\Rdbms\ResultWrapper, FormOptions)
#12 /srv/mediawiki/php-1.34.0-wmf.11/includes/specialpage/ChangesListSpecialPage.php(671): ChangesListSpecialPage->webOutput(Wikimedia\Rdbms\ResultWrapper, FormOptions)
#13 /srv/mediawiki/php-1.34.0-wmf.11/includes/specials/SpecialWatchlist.php(106): ChangesListSpecialPage->execute(NULL)
#14 /srv/mediawiki/php-1.34.0-wmf.11/includes/specialpage/SpecialPage.php(571): SpecialWatchlist->execute(NULL)
#15 /srv/mediawiki/php-1.34.0-wmf.11/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(NULL)
#16 /srv/mediawiki/php-1.34.0-wmf.11/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#17 /srv/mediawiki/php-1.34.0-wmf.11/includes/MediaWiki.php(884): MediaWiki->performRequest()
#18 /srv/mediawiki/php-1.34.0-wmf.11/includes/MediaWiki.php(515): MediaWiki->main()
#19 /srv/mediawiki/php-1.34.0-wmf.11/index.php(42): MediaWiki->run()

Change 522223 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Flow@master] Speculative fix for undefined index error in ChangesListFormatter

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

Catrope subscribed.

I can't reproduce this locally, and that one logstash entry you pasted is also the only log entry matching "AbstractFormatter" in the past 30 days (!). But I was able to theorize how this probably broke, so I've submitted a patch regardless.

Change 522223 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Speculative fix for undefined index error in ChangesListFormatter

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

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM