Topic on Extension talk:UserMerge

CyberXRef (talkcontribs)

We are having a pretty big issue as this extension stopped working. We are currently getting an error "1062: Duplicate entry" when trying to merge *anything* (at least that's what it looks like).


A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
UPDATE `ipblocks` SET ipb_user = '43742',ipb_address = 'XXXXXXXXXX' WHERE ipb_user = '43743'
from within function "UserMerge::mergeUser". Database returned error "1062: Duplicate entry 'XXXXXXXXXX-43742-0-0' for key 'ipb_address' (localhost)".


So it's trying to set an ID that's already in-use. Manually inspecting the database shows that indeed both IDs are still in-use. Any clue on why the previous row was not deleted (I am assuming that's what should have been done)? More importantly, why did it not error out when the deletion fail?

Box:

MediaWiki              1.21.3
PHP                    5.4.17 (apache2handler)
MySQL                  5.5.32
User Merge and Delete  1.8.1 (4fd1c08)

Any suggestions?

Wikinaut (talkcontribs)
CyberXRef (talkcontribs)

Thank you for the quick reply. The workaround works. I've noticed that only the user being merged/deleted needs to be unblocked, the user we are merging into can still be blocked.

Cmjohannes (talkcontribs)

Is it possible to write one line of code to unblock a user just before the code tries to delete the user?

I am using the UserMerge extension in conjunction with NukeAndBlock. I need to run NukeAndBlock because it deletes blocked users' contributions.

NukeAndBlock calls UserMerge with

$wgBaNSpamUser = "Spammer";

I think the code would work for my purposes, if there was a hack to simply unblock the user just before UserMerge's call to merge and delete the user. Can someone help me write that code?

Reply to "[WORKAROUND] Duplicate entry"