Page MenuHomePhabricator

PHP error on Special:Log from CentralAuthHooks::onHandleGrouprenameLogEntry
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request ID: W8ZxqQpAAEYAAAV0pF8AAADO

message
PHP Notice: Undefined index: 1

#0 /srv/mediawiki/php-1.32.0-wmf.24/extensions/CentralAuth/includes/CentralAuthHooks.php(218): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.32.0-wmf.24/includes/logging/LogPage.php(259): CentralAuthHooks::onHandleGrouprenameLogEntry(string, string, Title, SkinVector, array, boolean)
#2 /srv/mediawiki/php-1.32.0-wmf.24/includes/logging/LogFormatter.php(969): LogPage::actionText(string, string, Title, SkinVector, array, boolean)
#3 /srv/mediawiki/php-1.32.0-wmf.24/includes/logging/LogFormatter.php(445): LegacyLogFormatter->getActionMessage()
#4 /srv/mediawiki/php-1.32.0-wmf.24/includes/logging/LogEventsList.php(397): LogFormatter->getActionText()
#5 /srv/mediawiki/php-1.32.0-wmf.24/includes/logging/LogPager.php(389): LogEventsList->logLine(stdClass)
#6 /srv/mediawiki/php-1.32.0-wmf.24/includes/pager/IndexPager.php(446): LogPager->formatRow(stdClass)
#7 /srv/mediawiki/php-1.32.0-wmf.24/includes/specials/SpecialLog.php(266): IndexPager->getBody()
#8 /srv/mediawiki/php-1.32.0-wmf.24/includes/specials/SpecialLog.php(155): SpecialLog->show(FormOptions, array)
#9 /srv/mediawiki/php-1.32.0-wmf.24/includes/specialpage/SpecialPage.php(569): SpecialLog->execute(NULL)

Code:
https://github.com/wikimedia/mediawiki-extensions-CentralAuth/blob/9b73b04cdffb1c1b4d12b74334ee6cd40ff039ce/includes/CentralAuthHooks.php#L207-L218

Impact

Unknown.

I speculate it probably means the output of Special:Log is missing or misrepresenting some of the log entries (or parts thereof).

Notes

Reproducible via https://meta.wikimedia.org/w/index.php?title=Special:Log&type=gblrights&subtype=groupprms&limit=500.

Event Timeline

Krinkle created this task.Oct 16 2018, 11:24 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 16 2018, 11:24 PM

There is an old log entry without a new value in index 1 of the param

From api:

{
    "logid": 4765630,
    "ns": -1,
    "title": "Special:GlobalGroupPermissions/Apihighlimits-requestor",
    "pageid": 0,
    "logpage": 0,
    "params": {
        "0": "API_High_Limit_Requestor"
    },
    "type": "gblrights",
    "action": "grouprename",
    "user": "MarcoAurelio",
    "timestamp": "2013-03-28T10:27:41Z",
    "comment": "standardize global group names/testing new feature"
}

In other words, logs from pre I0003998612469b62583ab53c0917ad8116465a29 are failing now, because the old format is not handled - as mention in the code review already - https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/CentralAuth/+/56558/2/CentralAuth.php

Umherirrender triaged this task as Medium priority.

Change 498635 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/extensions/CentralAuth@master] Fix onHandleGrouprenameLogEntry for old log entries

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

Change 498635 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] Fix onHandleGrouprenameLogEntry for old log entries

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

Umherirrender closed this task as Resolved.Apr 11 2019, 4:38 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM