Page MenuHomePhabricator

TitleBlacklist: Call to a member function isOK() on array when action=query&prop=info&intestactions=edit
Closed, ResolvedPublic

Description

Error message
"errors": [
    {
        "code": "internal_api_error_Error",
        "key": "apierror-exceptioncaught",
        "params": [
            "Xlze3awQBHcAAAuo8jgAAAAH",
            "Call to a member function isOK() on array"
        ],
        "data": {
            "errorclass": "Error"
        }
    }
]
Impact
Notes

Details

Request ID
Xlze3awQBHcAAAuo8jgAAAAH
Request URL
https://wikidata.beta.wmflabs.org/wiki/Special:ApiSandbox#action=query&format=json&errorformat=raw&prop=info&meta=&titles=Q11&formatversion=2&intestactions=edit&intestactionsdetail=full
Stack Trace
Error at /srv/mediawiki/php-master/extensions/TitleBlacklist/includes/TitleBlacklistEntry.php(122)
#0 /srv/mediawiki/php-master/extensions/TitleBlacklist/includes/TitleBlacklist.php(222): TitleBlacklistEntry->matches(string, string)
#1 /srv/mediawiki/php-master/extensions/TitleBlacklist/includes/TitleBlacklist.php(187): TitleBlacklist->isBlacklisted(Title, string)
#2 /srv/mediawiki/php-master/extensions/TitleBlacklist/includes/TitleBlacklistHooks.php(34): TitleBlacklist->userCannot(Title, User, string)
#3 /srv/mediawiki/php-master/includes/Hooks.php(174): TitleBlacklistHooks::onUserCan(Title, User, string, string)
#4 /srv/mediawiki/php-master/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#5 /srv/mediawiki/php-master/includes/Permissions/PermissionManager.php(451): Hooks::run(string, array)
#6 /srv/mediawiki/php-master/includes/Permissions/PermissionManager.php(402): MediaWiki\Permissions\PermissionManager->checkPermissionHooks(string, User, array, string, boolean, Title)
#7 /srv/mediawiki/php-master/includes/Permissions/PermissionManager.php(282): MediaWiki\Permissions\PermissionManager->getPermissionErrorsInternal(string, User, Title, string)
#8 /srv/mediawiki/php-master/includes/api/ApiQueryInfo.php(564): MediaWiki\Permissions\PermissionManager->getPermissionErrors(string, User, Title, string)
#9 /srv/mediawiki/php-master/includes/api/ApiQueryInfo.php(387): ApiQueryInfo->extractPageInfo(integer, Title)
#10 /srv/mediawiki/php-master/includes/api/ApiQuery.php(263): ApiQueryInfo->execute()
#11 /srv/mediawiki/php-master/includes/api/ApiMain.php(1590): ApiQuery->execute()
#12 /srv/mediawiki/php-master/includes/api/ApiMain.php(522): ApiMain->executeAction()
#13 /srv/mediawiki/php-master/includes/api/ApiMain.php(493): ApiMain->executeActionWithErrorHandling()
#14 /srv/mediawiki/php-master/api.php(84): ApiMain->execute()
#15 /srv/mediawiki/w/api.php(3): require(string)
#16 {main}
Related Gerrit Patches:
mediawiki/extensions/TitleBlacklist : masterUpdate cache key for Unicode normalization

Event Timeline

Michael created this task.Mar 2 2020, 10:51 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 2 2020, 10:51 AM
Michael triaged this task as Unbreak Now! priority.Mar 2 2020, 10:52 AM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMar 2 2020, 10:52 AM
Restricted Application added a project: Wikidata. · View Herald TranscriptMar 2 2020, 12:08 PM
Addshore moved this task from incoming to monitoring on the Wikidata board.

$cache->getWithSetCallback() (gittiles) seems to return things that are not a Status

I guess that would be the cached value – I5d79426a32 changed what kinds of values are stored in the cache, but without changing the cache key, so now the cache will contain a mixture of Status objects and whatever used to be stored there prior to that change.

Change 576013 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/TitleBlacklist@master] Update cache key for Unicode normalization

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

Went for the straightforward fix – feel free to suggest a better one.

Krinkle removed a subscriber: Krinkle.

Yikes, didnt think about the cached use case. Thanks! I've reviewed the patch now.

Change 576013 merged by jenkins-bot:
[mediawiki/extensions/TitleBlacklist@master] Update cache key for Unicode normalization

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

Lucas_Werkmeister_WMDE closed this task as Resolved.Mar 2 2020, 3:32 PM

Seems to be fixed on Beta \o/