Repropduction:
- Navigate to https://m.wikidata.beta.wmflabs.org/wiki/Q579224 as an anon user
- Change and try to save the RYU language label
- The edit will fail, and the API response includes the exception.
{ error: { code: "internal_api_error_InvalidArgumentException", info: "[YFSJPKwQBHcAACBxYkUAAAAB] Exception caught: MediaWiki\User\UserEditTracker::getUserEditCount requires a user ID", errorclass: "InvalidArgumentException", *: "InvalidArgumentException at /srv/mediawiki/php-master/includes/user/UserEditTracker.php(65) from /srv/mediawiki/php-master/includes/user/UserEditTracker.php(65) #0 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Variables/LazyVariableComputer.php(302): MediaWiki\User\UserEditTracker->getUserEditCount(User) #1 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Variables/VariablesManager.php(88): MediaWiki\Extension\AbuseFilter\Variables\LazyVariableComputer->compute(MediaWiki\Extension\AbuseFilter\Variables\LazyLoadedVariable, MediaWiki\Extension\AbuseFilter\Variables\VariableHolder, Closure) #2 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Parser/AbuseFilterParser.php(1204): MediaWiki\Extension\AbuseFilter\Variables\VariablesManager->getVar(MediaWiki\Extension\AbuseFilter\Variables\VariableHolder, string, integer, string) #3 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Parser/AbuseFilterCachingParser.php(136): MediaWiki\Extension\AbuseFilter\Parser\AbuseFilterParser->getVarValue(string) #4 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Parser/AbuseFilterCachingParser.php(260): MediaWiki\Extension\AbuseFilter\Parser\AbuseFilterCachingParser->evalNode(MediaWiki\Extension\AbuseFilter\Parser\AFPTreeNode) #5 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Parser/AbuseFilterCachingParser.php(267): MediaWiki\Extension\AbuseFilter\Parser\AbuseFilterCachingParser->evalNode(MediaWiki\Extension\AbuseFilter\Parser\AFPTreeNode) #6 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Parser/AbuseFilterCachingParser.php(110): MediaWiki\Extension\AbuseFilter\Parser\AbuseFilterCachingParser->evalNode(MediaWiki\Extension\AbuseFilter\Parser\AFPTreeNode) #7 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Parser/AbuseFilterCachingParser.php(67): MediaWiki\Extension\AbuseFilter\Parser\AbuseFilterCachingParser->evalTree(MediaWiki\Extension\AbuseFilter\Parser\AFPSyntaxTree) #8 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Parser/AbuseFilterParser.php(399): MediaWiki\Extension\AbuseFilter\Parser\AbuseFilterCachingParser->intEval(string) #9 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Parser/AbuseFilterParser.php(410): MediaWiki\Extension\AbuseFilter\Parser\AbuseFilterParser->parse(string) #10 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/Parser/AbuseFilterParser.php(289): MediaWiki\Extension\AbuseFilter\Parser\AbuseFilterParser->parseDetailed(string) #11 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/FilterRunner.php(378): MediaWiki\Extension\AbuseFilter\Parser\AbuseFilterParser->checkConditions(string, string) #12 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/FilterRunner.php(344): MediaWiki\Extension\AbuseFilter\FilterRunner->checkFilter(MediaWiki\Extension\AbuseFilter\Filter\ExistingFilter, boolean) #13 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/FilterRunner.php(231): MediaWiki\Extension\AbuseFilter\FilterRunner->checkAllFiltersInternal() #14 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/AbuseFilterHooks.php(102): MediaWiki\Extension\AbuseFilter\FilterRunner->run() #15 /srv/mediawiki/php-master/extensions/AbuseFilter/includes/AbuseFilterHooks.php(45): MediaWiki\Extension\AbuseFilter\AbuseFilterHooks::filterEdit(DerivativeContext, User, Wikibase\Repo\Content\ItemContent, string, string) #16 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(330): MediaWiki\Extension\AbuseFilter\AbuseFilterHooks::onEditFilterMergedContent(DerivativeContext, Wikibase\Repo\Content\ItemContent, Status, string, User, boolean, string) #17 /srv/mediawiki/php-master/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array) #18 /srv/mediawiki/php-master/includes/Hooks.php(137): MediaWiki\HookContainer\HookContainer->run(string, array, array) #19 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/EditEntity/MediawikiEditFilterHookRunner.php(115): Hooks::run(string, array) #20 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/EditEntity/StatsdTimeRecordingEditFilterHookRunner.php(47): Wikibase\Repo\EditEntity\MediawikiEditFilterHookRunner->run(Wikibase\DataModel\Entity\Item, User, string) #21 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/EditEntity/MediawikiEditEntity.php(718): Wikibase\Repo\EditEntity\StatsdTimeRecordingEditFilterHookRunner->run(Wikibase\DataModel\Entity\Item, User, string) #22 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/EditEntity/StatsdSaveTimeRecordingEditEntity.php(77): Wikibase\Repo\EditEntity\MediawikiEditEntity->attemptSave(Wikibase\DataModel\Entity\Item, string, integer, string, boolean, array) #23 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/EntitySavingHelper.php(377): Wikibase\Repo\EditEntity\StatsdSaveTimeRecordingEditEntity->attemptSave(Wikibase\DataModel\Entity\Item, string, integer, string, NULL, array) #24 /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Api/ModifyEntity.php(329): Wikibase\Repo\Api\EntitySavingHelper->attemptSaveEntity(Wikibase\DataModel\Entity\Item, string) #25 /srv/mediawiki/php-master/includes/api/ApiMain.php(1646): Wikibase\Repo\Api\ModifyEntity->execute() #26 /srv/mediawiki/php-master/includes/api/ApiMain.php(616): ApiMain->executeAction() #27 /srv/mediawiki/php-master/includes/api/ApiMain.php(587): ApiMain->executeActionWithErrorHandling() #28 /srv/mediawiki/php-master/api.php(90): ApiMain->execute() #29 /srv/mediawiki/php-master/api.php(45): wfApiMain() #30 /srv/mediawiki/w/api.php(3): require(string) #31 {main}" }, servedby: "deployment-mediawiki-07" }