Page MenuHomePhabricator

Account name is not free to use again after account request is rejected
Closed, ResolvedPublic


Scenario is as follows:

  1. Sign-up from the main page, but don't provide example translations
  2. Sign-up is rejected by an admin. The message says that one can try again.

Trying to sign-up again with the same name fails:

exception.ERROR: [ca0b0084973670940bba3fdf] /w/api.php   Wikimedia\Rdbms\DBQueryError from line 1586 of /srv/mediawiki/tags/2019-06-10_15:00:00/includes/libs/rdbms/database/Database.php:
  A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
  Query: INSERT  INTO `bw_actor` (actor_user,actor_name) VALUES ('12345','Foobar')
  Function: User::updateActorId
  Error: 1062 Duplicate entry 'Foobar' for key 'actor_name' (

This is likely because the sandbox does not clean the actor table, which has been added recently.

In addition to fixing this bug, a process should be documented (possibly also scripted) how to clean up existing problematic entries.

Event Timeline

Change 518704 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Add code to delete user from the actor table

Implemented a fix for this. In addition removed some compatibility code added for pre MW 1.31. Fixed an issue were we were not updating the # of users under the site_stats.

Added a script - removeOrphanedActors.php to be run when we want to remove orphaned actors.

Test cases

These test cases were run with the TwnMainPage extension installed.

Please find the test case below,

TC #1 - Reject a sandbox translator and register with the same username

  1. Create a user with a username
  2. As an admin, reject the user via the Manage Translator Sandbox page
  3. Try registering the user with the same name again

Expected behavior

The user should be able to register without seeing any errors.

TC #2 - Should be able to approve previously rejected user

Run steps under TC 1.


  1. As an admin, approve the user via the Manage Translator Sandbox page

Expected behavior

The user should be approved, and should be able to translate properly.

Change 518704 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add code to delete user from the actor table

abi_ removed a project: Patch-For-Review.

Hi @Pginer-WMF

We've started working on this ticket in the last week of the previous quarter, with the patch being reviewed and merged in this quarter.

Please add this ticket in the current quarter board.

Moving to in-review as the patch has been merged. Please wait before starting QA as the MLEB instance has yet to be setup.

Tested this on the MLEB instance. This is working fine.

  1. Registered as a user with the username - Test
  2. Logged in as an admin from another browser.
  3. As admin user, opened the Translate Sandbox ( Special Pages > Manage translator sandbox)
  4. As admin user, rejected the newly registered user.
  5. Went back to the previous window and logged out from the Test account
  6. Tried to register again with username - Test.

Was able to successfully register with the same username again.

FYI, We have the Manage translator sandbox to manually review new users and their translations, before approving them as a regular user on

I have deployed this to and ran the script:

found 117 orphaned actors...
Actor: 'YasiaZayka'; Actor Id: 20128; Actor User: 26795;
Actor: 'Felege'; Actor Id: 20129; Actor User: 26796;
Actor: 'Bryard'; Actor Id: 20130; Actor User: 26797;
Actor: 'Hatem'; Actor Id: 20133; Actor User: 26800;
Actor: 'Huynhtuong'; Actor Id: 40812; Actor User: 26801;
Actor: 'Shahriar.dehghani'; Actor Id: 40815; Actor User: 26805;
Actor: 'Gilberto'; Actor Id: 40819; Actor User: 26809;
Actor: 'Knobbydee77'; Actor Id: 40820; Actor User: 26810;
Actor: 'Salamatu yussif'; Actor Id: 60955; Actor User: 26814;
Actor: 'Mokhriz3nomic'; Actor Id: 60964; Actor User: 26823;
Actor: 'FAIZ503'; Actor Id: 60965; Actor User: 26824;
Actor: 'Refikayata'; Actor Id: 60966; Actor User: 26825;
Actor: 'Jacek Janowski'; Actor Id: 60971; Actor User: 26830;
Actor: 'Aisyaic'; Actor Id: 60972; Actor User: 26831;
Actor: 'Lockey007'; Actor Id: 60973; Actor User: 26832;
Actor: 'Gianni Frisardi'; Actor Id: 101280; Actor User: 26845;
Actor: 'TFerenczy'; Actor Id: 101282; Actor User: 26847;
Actor: 'Kjeanclaude'; Actor Id: 161805; Actor User: 26851;
Actor: 'Thanvanhai'; Actor Id: 161808; Actor User: 26854;
Actor: 'Micha911'; Actor Id: 161809; Actor User: 26855;
Actor: 'Zgzzh2008'; Actor Id: 161810; Actor User: 26856;
Actor: 'Melissa'; Actor Id: 161811; Actor User: 26857;
Actor: 'Pkan'; Actor Id: 161812; Actor User: 26858;
Actor: 'Huanj'; Actor Id: 161813; Actor User: 26859;
Actor: 'Szymon.antas'; Actor Id: 161815; Actor User: 26861;
Actor: 'Kelvintys38'; Actor Id: 161816; Actor User: 26862;
Actor: 'Fwscode'; Actor Id: 161823; Actor User: 26869;
Actor: 'တောင်ပေါ်သား'; Actor Id: 161825; Actor User: 26871;
Actor: 'Viki'; Actor Id: 161829; Actor User: 26875;
Actor: 'Terry'; Actor Id: 161830; Actor User: 26876;
Actor: 'Keith Edgerley'; Actor Id: 161831; Actor User: 26877;
Actor: 'SP47471'; Actor Id: 161832; Actor User: 26878;
Actor: 'Clarissa Au'; Actor Id: 161833; Actor User: 26879;
Actor: 'Manavpreet Kaur'; Actor Id: 161836; Actor User: 26882;
Actor: 'Athar khan'; Actor Id: 161837; Actor User: 26883;
Actor: 'Sonnensein'; Actor Id: 161839; Actor User: 26885;
Actor: 'Berlinster'; Actor Id: 161846; Actor User: 26892;
Actor: 'Dheerajmpai23'; Actor Id: 161847; Actor User: 26893;
Actor: 'Yournam'; Actor Id: 161848; Actor User: 26894;
Actor: 'Mohammaddaneshgar'; Actor Id: 161850; Actor User: 26896;
Actor: 'Chancery'; Actor Id: 161851; Actor User: 26897;
Actor: 'Damanite'; Actor Id: 161857; Actor User: 26903;
Actor: 'Miron'; Actor Id: 161859; Actor User: 26905;
Actor: 'Anita Koncz'; Actor Id: 161860; Actor User: 26906;
Actor: 'Theworldofkillers'; Actor Id: 161861; Actor User: 26907;
Actor: 'IvanVano777'; Actor Id: 161865; Actor User: 26911;
Actor: 'Manuel1104'; Actor Id: 161867; Actor User: 26913;
Actor: 'The NiX'; Actor Id: 161869; Actor User: 26915;
Actor: 'เอกสิทธิ์ เอมสอาด'; Actor Id: 161870; Actor User: 26916;
Actor: 'عبدالرحيم 2030'; Actor Id: 161875; Actor User: 26921;
Actor: 'Armando cisneros orozco'; Actor Id: 161876; Actor User: 26922;
Actor: 'Akmal'; Actor Id: 161881; Actor User: 26927;
Actor: 'Erwinelbby'; Actor Id: 161884; Actor User: 26930;
Actor: 'S gulsher'; Actor Id: 161886; Actor User: 26932;
Actor: 'そらたこ'; Actor Id: 161887; Actor User: 26933;
Actor: 'Олександра'; Actor Id: 161889; Actor User: 26935;
Actor: 'Amir Hasasnyian.'; Actor Id: 161892; Actor User: 26938;
Actor: 'Ogurtsow'; Actor Id: 161893; Actor User: 26939;
Actor: 'Nanididin'; Actor Id: 161894; Actor User: 26940;
Actor: 'Myra Monteverde'; Actor Id: 161895; Actor User: 26941;
Actor: 'Joy Agyepong'; Actor Id: 161896; Actor User: 26942;
Actor: 'Dinoguy1000'; Actor Id: 161898; Actor User: 26944;
Actor: 'Theworldofmurders500'; Actor Id: 161900; Actor User: 26946;
Actor: 'PkanCHennn'; Actor Id: 161902; Actor User: 26948;
Actor: 'Yulii'; Actor Id: 161905; Actor User: 26951;
Actor: 'Naseer Ahmad'; Actor Id: 161910; Actor User: 26956;
Actor: 'Pyaralib'; Actor Id: 161911; Actor User: 26957;
Actor: 'Shivaraj Shetty'; Actor Id: 161912; Actor User: 26958;
Actor: 'ProrokF56'; Actor Id: 161913; Actor User: 26959;
Actor: 'Naufal06'; Actor Id: 161914; Actor User: 26960;
Actor: 'Siriwan17'; Actor Id: 161915; Actor User: 26961;
Actor: 'Hossein.income'; Actor Id: 161917; Actor User: 26963;
Actor: 'Riedi2070'; Actor Id: 161919; Actor User: 26965;
Actor: 'Haghighi ahmad'; Actor Id: 161926; Actor User: 26972;
Actor: 'Xsxy x s dcdx'; Actor Id: 161937; Actor User: 26983;
Actor: 'Monzza2015'; Actor Id: 161938; Actor User: 26984;
Actor: 'PEKSI GARUDA CAHAYA NUR JANAHA'; Actor Id: 161941; Actor User: 26987;
Actor: 'Bilalbouyahia'; Actor Id: 161942; Actor User: 26988;
Actor: 'Лорд Алекс'; Actor Id: 161945; Actor User: 26991;
Actor: 'Cristall01'; Actor Id: 161946; Actor User: 26992;
Actor: 'My CityGuide'; Actor Id: 161947; Actor User: 26993;
Actor: 'Slotus'; Actor Id: 161948; Actor User: 26994;
Actor: 'Emmanuel'; Actor Id: 161949; Actor User: 26995;
Actor: 'Mateo K 01'; Actor Id: 161951; Actor User: 26997;
Actor: 'Knep'; Actor Id: 161952; Actor User: 26998;
Actor: 'Hochithanh777'; Actor Id: 161953; Actor User: 26999;
Actor: 'Minmyo Koko'; Actor Id: 161954; Actor User: 27000;
Actor: 'Margarito d Jesús Rodríguez'; Actor Id: 161959; Actor User: 27005;
Actor: 'عبدالعزيز القاضي'; Actor Id: 161960; Actor User: 27006;
Actor: 'Bee'; Actor Id: 161961; Actor User: 27007;
Actor: 'Mart'; Actor Id: 161963; Actor User: 27009;
Actor: 'Rasit Emie'; Actor Id: 161966; Actor User: 27012;
Actor: 'DNSE'; Actor Id: 161968; Actor User: 27014;
Actor: 'مرجان'; Actor Id: 161976; Actor User: 27022;
Actor: 'MAJIDNIAREZA'; Actor Id: 161977; Actor User: 27023;
Actor: 'Aydarazi'; Actor Id: 161978; Actor User: 27024;
Actor: 'Mart.hakkinen'; Actor Id: 161979; Actor User: 27025;
Actor: 'İsa Beyit'; Actor Id: 161980; Actor User: 27026;
Actor: 'Risachan13'; Actor Id: 161982; Actor User: 27028;
Actor: 'Mrabdraju'; Actor Id: 161985; Actor User: 27031;
Actor: 'Dedicatedhosting4u'; Actor Id: 161986; Actor User: 27032;
Actor: 'Akmal' l'; Actor Id: 161987; Actor User: 27033;
Actor: 'Rasel Rasal'; Actor Id: 161988; Actor User: 27034;
Actor: 'Olga akimova'; Actor Id: 161990; Actor User: 27036;
Actor: 'Vss-moraes'; Actor Id: 162007; Actor User: 27053;
Actor: 'Wenskap'; Actor Id: 162008; Actor User: 27054;
Actor: 'استعادة الإعدادات الافتراضية المجانيه استعادة جميع البرامج جوجل كروم والويب المجانيه الافتراضية تثبيت تلقائي'; Actor Id: 162009; Actor User: 27055;
Actor: 'Turgut'; Actor Id: 162010; Actor User: 27056;
Actor: 'Marcelo Rosa Melo'; Actor Id: 162011; Actor User: 27057;
Actor: 'Шугаман'; Actor Id: 162012; Actor User: 27058;
Actor: 'احمد جعفري'; Actor Id: 162015; Actor User: 27061;
Actor: 'Dharampal Singh'; Actor Id: 162016; Actor User: 27062;
Actor: 'ARychlik'; Actor Id: 162019; Actor User: 27065;
Actor: 'Babyboi'; Actor Id: 162025; Actor User: 27071;
Actor: 'Thon Chanvannak'; Actor Id: 162026; Actor User: 27072;
Actor: 'Babiboi'; Actor Id: 162028; Actor User: 27074;
Actor: 'King7777'; Actor Id: 162034; Actor User: 27080;
deleted orphaned actors
updated the site stats for users

This has been tested extensively by @Jpita on MLEB testing instance and Niklas has checked this on production. Hence marking this as resolved.