Page MenuHomePhabricator

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

Description

Error

Request ID: W@JHKwpAMEQAACQYxLgAAABL

message
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
trace
#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)

Impact

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).

Notes

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 https://en.wikipedia.org/wiki/Special:Log/suppress 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

Krinkle created this task.Nov 7 2018, 3:24 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 7 2018, 3:24 AM
Krinkle updated the task description. (Show Details)
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 https://en.wikipedia.org/w/api.php?action=compare&format=json&prop=ids%7Ctitle&fromrev=865033520&torelative=prev. 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

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

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.

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

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

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

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

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

Anomie closed this task as Resolved.Dec 6 2018, 6:33 PM
Anomie claimed this task.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM