Page MenuHomePhabricator

Error: Call to a member function isSpecial() on null (via GrowthExperiments VariantHooks.php)
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Error: Call to a member function isSpecial() on null
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.9/extensions/GrowthExperiments/includes/VariantHooks.php(112)
#0 /srv/mediawiki/php-1.37.0-wmf.9/extensions/GrowthExperiments/includes/VariantHooks.php(96): GrowthExperiments\VariantHooks::isGrowthDonorCampaign(RequestContext)
#1 /srv/mediawiki/php-1.37.0-wmf.9/includes/HookContainer/HookContainer.php(160): GrowthExperiments\VariantHooks->onSpecialPage_initList(array)
#2 /srv/mediawiki/php-1.37.0-wmf.9/includes/HookContainer/HookRunner.php(3676): MediaWiki\HookContainer\HookContainer->run(string, array)
#3 /srv/mediawiki/php-1.37.0-wmf.9/includes/specialpage/SpecialPageFactory.php(1091): MediaWiki\HookContainer\HookRunner->onSpecialPage_initList(array)
#4 /srv/mediawiki/php-1.37.0-wmf.9/includes/specialpage/SpecialPageFactory.php(1106): MediaWiki\SpecialPage\SpecialPageFactory->getPageList()
#5 /srv/mediawiki/php-1.37.0-wmf.9/includes/specialpage/SpecialPageFactory.php(1452): MediaWiki\SpecialPage\SpecialPageFactory->getAliasList()
#6 /srv/mediawiki/php-1.37.0-wmf.9/includes/specialpage/SpecialPage.php(124): MediaWiki\SpecialPage\SpecialPageFactory->getLocalNameFor(string, boolean)
#7 /srv/mediawiki/php-1.37.0-wmf.9/includes/specialpage/SpecialPage.php(109): SpecialPage::getTitleValueFor(string, boolean, string)
#8 /srv/mediawiki/php-1.37.0-wmf.9/extensions/AbuseFilter/includes/AbuseFilterPreAuthenticationProvider.php(50): SpecialPage::getTitleFor(string)
#9 /srv/mediawiki/php-1.37.0-wmf.9/extensions/AbuseFilter/includes/AbuseFilterPreAuthenticationProvider.php(33): MediaWiki\Extension\AbuseFilter\AbuseFilterPreAuthenticationProvider->testUser(User, User, boolean)
#10 /srv/mediawiki/php-1.37.0-wmf.9/includes/auth/AuthManager.php(1712): MediaWiki\Extension\AbuseFilter\AbuseFilterPreAuthenticationProvider->testUserForCreation(User, string, array)
#11 /srv/mediawiki/php-1.37.0-wmf.9/includes/Setup.php(835): MediaWiki\Auth\AuthManager->autoCreateUser(User, string, boolean)
#12 /srv/mediawiki/php-1.37.0-wmf.9/includes/WebStart.php(87): require_once(string)
#13 /srv/mediawiki/php-1.37.0-wmf.9/index.php(44): require(string)
#14 /srv/mediawiki/w/index.php(3): require(string)
#15 {main}
Impact
Notes

Details

Request URL
https://es.wikipedia.org/w/index.php?title=*&returnto=*&campaign=*

Event Timeline

Krinkle renamed this task from Error: Call to a member function isSpecial() on null to Error: Call to a member function isSpecial() on null (via GrowthExperiments VariantHooks.php).Jun 24 2021, 9:28 PM
Krinkle added a project: GrowthExperiments.
Krinkle moved this task from Untriaged to June 2021 on the Wikimedia-production-error board.
Krinkle removed a subscriber: Growth-Team.

Right, SpecialPage_initList can be called before the global title is set (when it's triggered from Setup.php, like via user autocreation here).

kostajh triaged this task as Medium priority.

Change 701495 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] VariantHooks: Check if context has a title before using

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

I don't think this needs a backport (at least not on a Friday), the impact is limited to logged-in users who visit Special:Create account using the campaign query parameter.

It's limited to logged-in users who have not visited the given wiki before, even.

Change 701495 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] VariantHooks: Check if title exists before using isSpecial

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