Page MenuHomePhabricator

UserMerge cannot create an actor for a usable name that is not an existing user.
Closed, DuplicatePublic


MediaWiki 1.33.1 (d35fba2) 15:11, December 17, 2019
PHP 7.2.17-0ubuntu0.18.04.1 (apache2handler)
MariaDB 10.1.38-MariaDB-0ubuntu0.18.04.1

After upgrading to 1.33 and without experiencing any problems before, UserMerge now returns this internal error if I try to delete a user.

[c02b64cc6985efa1bd1d9998] /wiki/Special:UserMerge CannotCreateActorException from line 2516 of /var/www/w/includes/user/User.php: Cannot create an actor for a usable name that is not an existing user


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

NOTE: I have never had to explicitly declare user B (Anonymous) before.

Event Timeline

@Silkwood: Assuming this task is about MediaWiki-extensions-UserMerge hence adding project tag so others can find this task when searching for tasks under that project or looking at that project workboard.

Silkwood claimed this task.

It was enough to add the following line in LocalSettings.php

// Add just one user name to the default array
$wgReservedUsernames[] = 'Anonymous';
Aklapper removed Silkwood as the assignee of this task.

Great to hear that you found a solution. Reopening this task as the code should still not show a raw exception in that case but gracefully handle this.