Wishlist 0 ¥0.00

Update error solved: Error SQL Duplicate entry for key 'idx_username'

Update error solved: Error SQL Duplicate entry for key 'idx_username'

The recent release of Joomla 3.9.16 includes the addition of a database index to the users table. If your Joomla website happens to have duplicate usernames, this index addition will fail and you will see an error as in the attached image. The rest of the update will typically succeed just fine. 

Should you have this error, you must first find and solve the duplicate username problems. Each username in your site should be unique, so you should either rename or remove duplicates. 

To find the duplicates you can run the following MySQL command (replace #_ with the prefix for your tables)

SELECT username FROM #__users GROUP BY username HAVING COUNT(*) > 1

Once you have solved that, then you can navigate to the database fix function and run it to add the missed index. To do that navigate to Extensions > Manage > Database and click the 'Fix' button.

If you experience any issues with this fix, please feel free to get in touch!

About Us

Since 1996, our company has been focusing on domain name registration, web hosting, server hosting, website construction, e-commerce and other Internet services, and constantly practicing the concept of "providing enterprise-level solutions and providing personalized service support". As a Dell Authorized Solution Provider, we also provide hardware product solutions associated with the company's services.
 

Contact Us

Address: No. 2, Jingwu Road, Zhengzhou City, Henan Province

Phone: 0086-371-63520088 

QQ:76257322

Website: 800188.com

E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.