Page MenuHomePhabricator

InvalidArgumentException "The Title object yields no ID" from Flow\LinksTableUpdater (via LinksUpdate::construct)
Closed, ResolvedPublic

Description

The following error seems to have started appearing since php-1.32.0-wmf.15.

Query +message:InvalidArgumentException AND +LinksUpdate AND +Flow at https://logstash.wikimedia.org/app/kibana#/dashboard/mediawiki-errors shows it started 2018-08-03.

So far, only on zh.wikipedia.org.

[{exception_id}] {exception_url}   InvalidArgumentException from line 119 of /srv/mediawiki/php-1.32.0-wmf.15/includes/deferred/LinksUpdate.php: The Title object yields no ID. Perhaps the page doesn't exist?

exception_id: W2rztgpAAD4AAE33jj4AAACA
exception.message: The Title object yields no ID. Perhaps the page doesn't exist?
wiki: zhwiki
url: /wiki/Special:%E5%8F%82%E6%95%B0%E8%AE%BE%E7%BD%AE (Special:Preferences)
http_method: POST

exception.trace:
#0 /srv/mediawiki/php-1.32.0-wmf.15/includes/content/AbstractContent.php(238): LinksUpdate->__construct(Title, ParserOutput, boolean)
#1 /srv/mediawiki/php-1.32.0-wmf.15/extensions/Flow/includes/LinksTableUpdater.php(35): AbstractContent->getSecondaryDataUpdates(Title)
#2 /srv/mediawiki/php-1.32.0-wmf.15/extensions/Flow/includes/Data/Listener/ReferenceRecorder.php(92): Flow\LinksTableUpdater->doUpdate(Flow\Model\Workflow)
#3 /srv/mediawiki/php-1.32.0-wmf.15/includes/deferred/MWCallableUpdate.php(34): Closure$Flow\Data\Listener\ReferenceRecorder::onAfterInsert()
#4 /srv/mediawiki/php-1.32.0-wmf.15/includes/deferred/DeferredUpdates.php(268): MWCallableUpdate->doUpdate()
#5 /srv/mediawiki/php-1.32.0-wmf.15/includes/deferred/DeferredUpdates.php(226): DeferredUpdates::runUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti, string, integer)
#6 /srv/mediawiki/php-1.32.0-wmf.15/includes/deferred/DeferredUpdates.php(134): DeferredUpdates::execute(array, string, integer)
#7 /srv/mediawiki/php-1.32.0-wmf.15/includes/MediaWiki.php(913): DeferredUpdates::doUpdates(string)
#8 /srv/mediawiki/php-1.32.0-wmf.15/includes/MediaWiki.php(733): MediaWiki->restInPeace(string, boolean)
#9 [internal function]: Closure$MediaWiki::doPostOutputShutdown()
#10 {main}

Event Timeline

Krinkle created this task.Aug 9 2018, 11:16 PM
Restricted Application added subscribers: Cosine02, Aklapper. · View Herald TranscriptAug 9 2018, 11:16 PM
kostajh added a subscriber: kostajh.

Discussed in Growth team triage today, we'll get to this in Q2.

kostajh claimed this task.
kostajh moved this task from Incoming to In Progress on the Growth-Team (Current Sprint) board.

Change 472053 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/Flow@master] Ensure article ID exists before getting secondary data updates

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

I'm able to reproduce this by:

  1. enabling the flow beta feature on my talk page
  2. disabling it
  3. enabling it again

At the beginning of step 3 above, this code executes:

  • Flow ReferenceRecorder's onAfterInsert calls $linksTableUpdater->doUpdate( $workflow );
  • In doUpdate() there's $updates = $content->getSecondaryDataUpdates( $title );
  • That code tries to construct a new LinksUpdate object with a Title that has a DB key like {Username}/Structured_Discussions_Archive_1 with a content model of flow-board, and whose article ID is 0. LinksUpdate throws an exception. The article ID is 0 because the page has already been moved, so fetchPageRow in includes/cache/LinkCache.php doesn't find anything

As a side note, calling getSecondaryDataUpdates() is deprecated but I think that is another issue for another day.

Change 472053 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Ensure article ID exists before getting secondary data updates

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

Etonkovidova closed this task as Resolved.Nov 21 2018, 1:19 AM