Page MenuHomePhabricator

Argument 2 passed to MediaWiki\Extension\AbuseFilter\TextExtractor::revisionToString()
Closed, InvalidPublicBUG REPORT

Description

When I want to save edit in the main page on https://discordwiki.wmcloud.org I get this error:

[c42df92ca2a79b9e2905851f] /index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B0&action=submit TypeError from line 49 of /var/www/html/extensions/AbuseFilter/includes/TextExtractor.php: Argument 2 passed to MediaWiki\Extension\AbuseFilter\TextExtractor::revisionToString() must be an instance of MediaWiki\Permissions\Authority, instance of User given, called in /var/www/html/extensions/AbuseFilter/includes/VariableGenerator/RunVariableGenerator.php on line 104

Backtrace:

#0 /var/www/html/extensions/AbuseFilter/includes/VariableGenerator/RunVariableGenerator.php(104): MediaWiki\Extension\AbuseFilter\TextExtractor->revisionToString(MediaWiki\Revision\RevisionStoreRecord, User)
#1 /var/www/html/extensions/AbuseFilter/includes/VariableGenerator/RunVariableGenerator.php(180): MediaWiki\Extension\AbuseFilter\VariableGenerator\RunVariableGenerator->getEditTextForFiltering(WikiPage, WikitextContent, string)
#2 /var/www/html/extensions/AbuseFilter/includes/AbuseFilterHooks.php(222): MediaWiki\Extension\AbuseFilter\VariableGenerator\RunVariableGenerator->getEditVars(WikitextContent, string, string, string, WikiPage)
#3 /var/www/html/extensions/AbuseFilter/includes/AbuseFilterHooks.php(172): MediaWiki\Extension\AbuseFilter\AbuseFilterHooks::filterEdit(DerivativeContext, User, WikitextContent, string, string)
#4 /var/www/html/includes/HookContainer/HookContainer.php(333): MediaWiki\Extension\AbuseFilter\AbuseFilterHooks::onEditFilterMergedContent(DerivativeContext, WikitextContent, Status, string, User, boolean)
#5 /var/www/html/includes/HookContainer/HookContainer.php(140): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#6 /var/www/html/includes/HookContainer/HookRunner.php(1542): MediaWiki\HookContainer\HookContainer->run(string, array)
#7 /var/www/html/includes/editpage/Constraint/EditFilterMergedContentHookConstraint.php(90): MediaWiki\HookContainer\HookRunner->onEditFilterMergedContent(DerivativeContext, WikitextContent, Status, string, User, boolean)
#8 /var/www/html/includes/editpage/Constraint/EditConstraintRunner.php(88): MediaWiki\EditPage\Constraint\EditFilterMergedContentHookConstraint->checkConstraint()
#9 /var/www/html/includes/EditPage.php(2266): MediaWiki\EditPage\Constraint\EditConstraintRunner->checkConstraints()
#10 /var/www/html/includes/EditPage.php(1687): EditPage->internalAttemptSave(NULL, boolean)
#11 /var/www/html/includes/EditPage.php(662): EditPage->attemptSave(NULL)
#12 /var/www/html/includes/actions/EditAction.php(71): EditPage->edit()
#13 /var/www/html/includes/actions/SubmitAction.php(38): EditAction->show()
#14 /var/www/html/includes/MediaWiki.php(532): SubmitAction->show()
#15 /var/www/html/includes/MediaWiki.php(316): MediaWiki->performAction(Article, Title)
#16 /var/www/html/includes/MediaWiki.php(945): MediaWiki->performRequest()
#17 /var/www/html/includes/MediaWiki.php(548): MediaWiki->main()
#18 /var/www/html/index.php(53): MediaWiki->run()
#19 /var/www/html/index.php(46): wfIndexMain()
#20 {main}

Event Timeline

This is an impossible error:

class User implements Authority, IDBAccessObject, UserIdentity {

Authority was introduced recently, but according to Special:Version it should already exist on the wiki. I'd suggest double-checking this, unless it's an opcache issue (never seen it on dev wikis though).

See https://srwiki-dev.wmcloud.org/index.php/Special:Version for details like the version and etc.

My mistake. This happens on https://discordwiki.wmcloud.org, no on srwiki-dev wiki. It is confusable, as both wikis are regularly updated by a bash script each Thursday at 21:00 UTC+1.

This is an impossible error:

class User implements Authority, IDBAccessObject, UserIdentity {

Authority was introduced recently, but according to Special:Version it should already exist on the wiki. I'd suggest double-checking this, unless it's an opcache issue (never seen it on dev wikis though).

I know that it was introduced recently. :) I will check again.

See https://srwiki-dev.wmcloud.org/index.php/Special:Version for details like the version and etc.

My mistake. This happens on https://discordwiki.wmcloud.org, no on srwiki-dev wiki. It is confusable, as both wikis are regularly updated by a bash script each Thursday at 21:00 UTC+1.

Special:Version on that wiki says it's using 389ef0b944b6ae38130acedc950e4fa54a7d3f8e, which is more than one month old, hence the error.

See https://srwiki-dev.wmcloud.org/index.php/Special:Version for details like the version and etc.

My mistake. This happens on https://discordwiki.wmcloud.org, no on srwiki-dev wiki. It is confusable, as both wikis are regularly updated by a bash script each Thursday at 21:00 UTC+1.

Special:Version on that wiki says it's using 389ef0b944b6ae38130acedc950e4fa54a7d3f8e, which is more than one month old, hence the error.

Oh, thank you. I forgot to add lines for updating mediawiki/core. I added it now, run script, and everything works now.