Page MenuHomePhabricator

RevisionAccessException from ApiComparePages.php: Could not determine title for page/revision ID
Closed, ResolvedPublicPRODUCTION ERROR




MediaWiki\Revision\RevisionAccessException: Could not determine title for page ID # and revision ID #

from line 391 of /srv/mediawiki/php-1.32.0-wmf.26/includes/Revision/RevisionStore.php
#0 /srv/mediawiki/php-1.33.0-wmf.1/includes/Revision/RevisionStore.php(379): MediaWiki\Revision\RevisionStore->getTitle(integer, integer, integer)
#1 /srv/mediawiki/php-1.33.0-wmf.1/includes/Revision/RevisionStore.php(2531): MediaWiki\Revision\RevisionStore->getTitle(integer, integer)
#2 /srv/mediawiki/php-1.33.0-wmf.1/includes/api/ApiComparePages.php(68): MediaWiki\Revision\RevisionStore->getPreviousRevision(MediaWiki\Revision\RevisionArchiveRecord)
#3 /srv/mediawiki/php-1.33.0-wmf.1/includes/api/ApiMain.php(1570): ApiComparePages->execute()
#4 /srv/mediawiki/php-1.33.0-wmf.1/includes/api/ApiMain.php(531): ApiMain->executeAction()
#5 /srv/mediawiki/php-1.33.0-wmf.1/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#6 /srv/mediawiki/php-1.33.0-wmf.1/api.php(87): ApiMain->execute()
#7 /srv/mediawiki/w/api.php(3): include(string)


It seems that for certain revisions, users are unable to obtain comparison information from the API. Specifically, archived revisions (possibly limited to those that are oversighted).


Reported in WMF Logstash 204 times in recent weeks (since 1.32.wmf-24, possibly earlier).

It is seen from multiple different wikis for a wide range of different page IDs and revisions. The referer for many of them are like which suggests it might be triggered by a gadget attempting to provide information from the API about revisions in the log.

I don't know if comparing oversighted/archived revisions is currently supported in the API, but at least it shouldn't fatal.

Event Timeline

Anomie added a subscriber: Anomie.

Example URLs to reproduce the error would be really helpful in bug reports like this. Even a link to the error in Kibana would be better than having to copy-paste the request ID.

For this specific instance, that's It looks like what's going on here is that RevisionStore::getPreviousRevision() blows up when passed a RevisionArchiveRecord rather than a RevisionStoreRecord.

Change 472180 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] ApiComparePages: Don't try to find next/prev of a deleted revision

Change 475459 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] Avoid exception when asking for prev/next of deleted revision.

Change 475459 merged by jenkins-bot:
[mediawiki/core@master] RevisionStore: Avoid exception on prev/next of deleted revision

Change 472180 merged by jenkins-bot:
[mediawiki/core@master] ApiComparePages: Don't try to find next/prev of a deleted revision

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