J3.x

Duplicate usernames cause update issue: Difference between revisions

From Joomla! Documentation

m Marked for translation
No edit summary
Line 1: Line 1:
<noinclude><languages /></noinclude>
<noinclude><languages /></noinclude>
In a small number of sites (generally older sites) there have been issues upgrading to Joomal 3.9.16 showing a SQL Error. If this happens do not panic - the upgrade has largely completed on your site and you need to make a small adjustment as detailed below.
In some websites, updating to Joomla 3.9.16 results in a database error due to duplicated usernames. If this happens do not panic - the upgrade has been mostly completed without issue, and the remaining database change can be applied after following the instructions below.


==Errors reported==
==Errors reported==

Revision as of 16:47, 10 March 2020

In some websites, updating to Joomla 3.9.16 results in a database error due to duplicated usernames. If this happens do not panic - the upgrade has been mostly completed without issue, and the remaining database change can be applied after following the instructions below.

Errors reported

Users receive an update error regarding a failed database query due to a duplicated key in their site's #__users table when upgrading from Joomla 3.9.15 or older.

Joomla 3.9.16 Upgrade Error

Versions affected

General Information

This pertains only to Joomla! version(s): 3.9.16

What is the cause

Your website has more than one user in the #__users table with the same username, which is a security concern in that the incorrect account may be accessed by the wrong account owner.

How to fix

You will need to review your #__users table in your database and fix any duplicated usernames by either removing old user accounts or changing the username until all usernames are unique. Once this is finished, if you have already upgraded to 3.9.16 run the database schema fixer tool to finish the upgrade (this step is not required if you do this review prior to upgrading).

Joomla is unable to automatically determine the correct action to take and as a result is unable to perform this step for you - it has to be fixed by you as the site owner.

The following SQL Query can be run on your database to view which usernames are duplicated:

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