Page MenuHomePhabricator

SpecialDeletedContributions emits PHP error "Undefined index: deletedcontribs"
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request ID: W9tCPApAIEIAAKWQ9TAAAAAP

message
PHP Notice: Undefined index: deletedcontribs
trace
#0 /srv/mediawiki/php-1.32.0-wmf.24/includes/GlobalFunctions.php(234): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.32.0-wmf.24/includes/specials/SpecialDeletedContributions.php(156): wfArrayInsertAfter(array, array, string)
#2 /srv/mediawiki/php-1.32.0-wmf.24/includes/specials/SpecialDeletedContributions.php(92): DeletedContributionsPage->getSubTitle(User)
#3 /srv/mediawiki/php-1.32.0-wmf.24/includes/specialpage/SpecialPage.php(569): DeletedContributionsPage->execute(string)
#4 /srv/mediawiki/php-1.32.0-wmf.24/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(string)
#5 /srv/mediawiki/php-1.32.0-wmf.24/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#6 /srv/mediawiki/php-1.32.0-wmf.24/includes/MediaWiki.php(868): MediaWiki->performRequest()
#7 /srv/mediawiki/php-1.32.0-wmf.24/includes/MediaWiki.php(525): MediaWiki->main()
#8 /srv/mediawiki/php-1.32.0-wmf.24/index.php(42): MediaWiki->run()

Impact

Unknown.

It is currently a non-fatal error, which could mean that it is completely broken (the user asked for information that is available but nothing is displayed), or it could mean it is an expected issue that the code forgot to explicitly check for and happens to work right - or anything in-between.

Notes

The Special:DeletedContributions page is restricted. To investigate/reproduce the issue, administrator privileges are required.

The error is recorded in Logstash from en.wikipedia.org, sv.wikipedia.org and nl.wikipedia.org with URLs like "/wiki/Special:DeletedContributions/123.123.123.123/21?namespace=0" (where 123.123.123.13 is an IP, and /21 a CIDR range).

Event Timeline

Krinkle created this task.Nov 1 2018, 8:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 1 2018, 8:30 PM

According to https://codesearch.wmflabs.org/search/?q=deletedcontribs&i=nope&files=&repos= there are no so many places

SpecialDeletedContributions assumed a key from SpecialContributions, which is only there under the deletedhistory permissions and IP::isValidRange returns false.

SpecialDeletedContributions can only be used under that permission, but the range part is not true here, so the key is not set and undefined

Possible an issue since https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/349457/, which adds the ip range support for Special:Contributions
From the commit message: "For the time being, Special:DeletedContributions does not support IP ranges."

Change 490571 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/core@master] Prevent PHP notice on SpecialDeletedContributions

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

Umherirrender closed this task as Resolved.Feb 15 2019, 6:46 PM
Umherirrender assigned this task to matej_suchanek.
Umherirrender triaged this task as Medium priority.

Change 490571 merged by jenkins-bot:
[mediawiki/core@master] Prevent PHP notice on SpecialDeletedContributions

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

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