XF 2.1 XF\Db\DuplicateKeyException

Onlyme

Active member
Hi guys, I'm getting this error when trying to create a new user. Any help is much appreciated.

XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '755' for key 'PRIMARY' src/XF/Db/AbstractStatement.php:228

INSERT INTO xf_user (visible, activity_visible, user_group_id, timezone, language_id, xfa_cui_type, xfa_cui_params, downloaded, uploaded, wait_time, peers_limit, seedbonus, freeleech, can_leech, upload_multiplier, download_multiplier, username, email, secondary_group_ids, user_state, is_staff, custom_title, message_count, reaction_score, trophy_points, style_id, xa_sb_cash, snog_ignorechange, snog_ignoredate, dbtech_shop_purchase, display_style_group_id, secret_key, torrent_pass, torrent_pass_version, user_id, permission_combination_id, alerts_unread, conversations_unread, register_date, last_activity, avatar_date, avatar_width, avatar_height, avatar_highdpi, gravatar, is_moderator, is_admin, is_banned, warning_points, privacy_policy_accepted, terms_accepted, xa_sb_event_count, xa_sb_wager_count, xa_sb_bet_count, xa_sb_bet_challenge_count, snog_oldflag, snog_flagip, thdonate_total_donation, thdonate_total_public_donation, thdonate_total_anonymous_donation, thdonate_num_donation, thdonate_num_public_donation, thdonate_num_anonymous_donation, snog_flag, credits, dbtech_shop_purchases, dbtech_shop_immunity, dbtech_shop_pendingtrades, dbtech_shop_item_count, siropu_chat_room_id, siropu_chat_conv_id, siropu_chat_rooms, siropu_chat_conversations, siropu_chat_settings, siropu_chat_room_join_time, siropu_chat_status, siropu_chat_is_sanctioned, siropu_chat_message_count, siropu_chat_last_activity, dbtech_security_forcenewpass, dbtech_security_lastbreach, dbtech_security_breached, siropu_referrer_id, siropu_referral_count, siropu_referrer_credit, snog_forms, xfa_cui_noanim) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1452): XF\Db\AbstractAdapter->insert('xf_user', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1184): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Mvc/FormAction.php(69): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Mvc/FormAction.php(187): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#8 src/XF/Admin/Controller/User.php(504): XF\Mvc\FormAction->run()
#9 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\User->actionSave(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:User', 'Save', Object(XF\Mvc\RouteMatch), Object(SV\SignupAbuseBlocking\XF\Admin\Controller\User), NULL)
#11 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\Rout
Controller\User), NULL)
#12 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#14 src/XF.php(391): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}
 
After testing on my local machine that has MariaDB 10.1 there is nothing wrong with my database.

My server had 10.3. I've installed 10.0 on the sever and everything is fine now.

Xenforo supports 10.3? Not sure what the issue could be, there was no errors in the mysql log.
 
Back
Top Bottom