Page MenuHomePhabricator

"Cannot create an actor for a usable name that is not an existing user" when deleting a user (merge to "Anonymous")
Closed, DuplicatePublicBUG REPORT

Description

Steps to Reproduce:

I installed the extension by copying folder 'UserMerge' to the folder "Extensions" of my wiki. Then I added these lines to the 'LocalSettings.php':

wfLoadExtension( 'UserMerge' );
// By default nobody can use this function, enable for bureaucrat?
$wgGroupPermissions['bureaucrat']['usermerge'] = true;

After that I tried to merge 'TestUser' with 'Anonymous', but I received error message:

[6cc061292b8db5d3b3f89303] /index.php/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:UserMerge CannotCreateActorException from line 2516 of C:\xampp\htdocs\math.local\includes\user\User.php: Cannot create an actor for a usable name that is not an existing user

Backtrace:

#0 C:\xampp\htdocs\math.local\extensions\UserMerge\includes\MergeUser.php(378): User->getActorId(Wikimedia\Rdbms\DatabaseMysqli)
#1 C:\xampp\htdocs\math.local\extensions\UserMerge\includes\MergeUser.php(50): MergeUser->mergeDatabaseTables(string)
#2 C:\xampp\htdocs\math.local\extensions\UserMerge\includes\SpecialUserMerge.php(135): MergeUser->merge(User, string)
#3 C:\xampp\htdocs\math.local\includes\htmlform\HTMLForm.php(660): SpecialUserMerge->onSubmit(array, OOUIHTMLForm)
#4 C:\xampp\htdocs\math.local\includes\htmlform\HTMLForm.php(552): HTMLForm->trySubmit()
#5 C:\xampp\htdocs\math.local\includes\htmlform\HTMLForm.php(567): HTMLForm->tryAuthorizedSubmit()
#6 C:\xampp\htdocs\math.local\includes\specialpage\FormSpecialPage.php(184): HTMLForm->show()
#7 C:\xampp\htdocs\math.local\includes\specialpage\SpecialPage.php(569): FormSpecialPage->execute(NULL)
#8 C:\xampp\htdocs\math.local\includes\specialpage\SpecialPageFactory.php(558): SpecialPage->run(NULL)
#9 C:\xampp\htdocs\math1solutions.local\includes\MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#10 C:\xampp\htdocs\math.local\includes\MediaWiki.php(865): MediaWiki->performRequest()
#11 C:\xampp\htdocs\math.local\includes\MediaWiki.php(515): MediaWiki->main()
#12 C:\xampp\htdocs\math.local\index.php(42): MediaWiki->run()
#13 {main}

I tried to use this extension on local server and on shared hosting - the result was the same.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 19 2019, 8:33 AM
GreyWolfling updated the task description. (Show Details)Nov 23 2019, 6:23 AM

Had the same issue on one of my wikis as well (when trying to delete a user account). Working on it, the solution from T241839: UserMerge cannot create an actor for a usable name that is not an existing user. looks promising, but needs to be done in a way that the extension does that for someone :D

Florian renamed this task from Problem with merge to "Anonymous" in Mediawiki 1.33 to "Cannot create an actor for a usable name that is not an existing user" when deleting a user (merge to "Anonymous").Apr 13 2020, 10:59 AM
Florian claimed this task.Apr 13 2020, 11:23 AM

Change 588388 had a related patch set uploaded (by Florianschmidtwelzow; owner: Florianschmidtwelzow):
[mediawiki/extensions/UserMerge@master] Automatically register 'Anonymous' as a reserved username

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

Change 588388 merged by jenkins-bot:
[mediawiki/extensions/UserMerge@master] Automatically register 'Anonymous' as a reserved username

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