MyBB Community Forums

Full Version: Mod CP - Error Message
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Im getting this error message when i try and upgrade a member.

MySQL error: 1062
Duplicate entry '138' for key 1
Query: INSERT INTO mybb_modoptions (uid, cpstyle, notes, permsset, caneditann, canmodposts, canban) VALUES ('138', 'Axiom', '', '1', 'yes', 'yes', 'yes')
Please describe better what exactly you wanted to do step by step,
which version of MyBB you have?
mybb_modoptions isn't a folder that comes with MyBB by default. It must be from a plugin/modification.
I'm assuming it's from the ModCP Plugin.

Are you promoting someone from Member to Mod? Or maybe Mod to Super Mod?

Little more detail please. Smile
Yes im promoting them from member to super mod again as another super mod demoted them.
This would be a possible bug in the Mod CP Plugin.

Upon demotion, the information contained in mybb_modoptions that was associated with that user was not removed, and when you tried to re-add him/her, it caused a duplication error in the database.

The plugin author will have to tell you how to fix as I do not use the plugin and I do not know the specifics on how to fix.

However, running the following Query in phpMyAdmin should remove the current entry for this person from the database.

After running this query, you should be able to re-add him/her as a Super Mod.

Note: This is untested, I recommend backing up your mybb_modoptions table in case something goes wrong. None of your other MyBB Tables should be affected by this.

DELETE FROM `mybb_modoptions` WHERE uid = 138 ;
Hmmm, I thought for sure that I fixed this bug. I must've uploaded an old version to the mods database for some reason. I'll work on fixing this.
Ok thanks for your help can you give me a shout when you have an update thanks.
This bug has been fixed, and will be included in the next update. Until then, you can download this file and upload it to /root/inc/plugins/ to fix the problem.
Thanks
Pages: 1 2