- Posts: 127
- Thank you received: 1
Save user error in Joomla user manager
- mikehermary
-
Topic Author
- Offline
-- Joomla version -- : 3.5.0
-- PHP version -- : 5.5.21
-- Browser(s) name and version -- : Safari 9.0.1
-- Error-message(debug-mod must be tuned on) -- : Save failed with the following error: Duplicate entry 'pfdted@gmail.com' for key 'user_email' SQL=UPDATE `#__hikashop_user` SET `user_email`='pfdted@gmail.com',`user_cms_id`='105480' WHERE `user_id`='279'
Hello,
The attached error is occurring when trying to save a user using the Joomla user manager. I have tried disabling the HikaShop user synchronization plugin and this removes the error, but I think this plugin needs to stay enabled for proper synchronization. I have other plugins that work with the Joomla user manager and I disabled them first to see if they were causing the issue, but they were not, so the issue looks to be with the HikaShop synchronization plugin and managing users using the user manager. Any help is greatly appreciated. Thank you.
Mike
Please Log in or Create an account to join the conversation.
That would indicate a synchronization problem with the user data.
Go in the HikaShop configuration and click on the "check database" button. That should run a resynchronization of the user data, and hopefully you won't get the error anymore.
Please Log in or Create an account to join the conversation.
- mikehermary
-
Topic Author
- Offline
- Posts: 127
- Thank you received: 1
I have re-enabled the plugin, then used the "Check Database" button, but this did not solve the issue. I tried saving a user again and the same SQL error was displayed.
Mike Hermary
Please Log in or Create an account to join the conversation.
So you have the error with any user ?
Not only one ?
Do you have real orders on your website already ?
If not, an easy solution would be to: empty (not delete) the table hikashop_user via your phpmyadmin and then run a "check database" again.
Please Log in or Create an account to join the conversation.
- mikehermary
-
Topic Author
- Offline
- Posts: 127
- Thank you received: 1
It only applies to certain users. I am assuming they are users that have made purchases using the online store, though they were purchases from Virtuemart and not HikaShop. This website is an upgrade and the Virtuemart data was imported. If I empty the HikaShop users table, will the orders table be affected at all?
Mike
Please Log in or Create an account to join the conversation.
So maybe it was a problem with the imported data.
If you empty the hikashop_user table, you'll loose the link between the user accounts and the orders. You'll still have the orders in the backend, but logged in others won't be able to see their previous orders and you won't be able to email the users for their order when you edit an order in the backend.
What that error means is that there is another entry in the table hikashop_user with the email address "pfdted@gmail.com" than the one with the id 279.
Search for both entries in that table with your phpmyadmin and provide a screenshot of the data of both and tell us which one is linked to orders in the hikashop_order table (with the same user_id in the order_user_id column).
I should then be able to give you a MySQL to run to fix that for all the users with the problem hopefully.
Please Log in or Create an account to join the conversation.
- mikehermary
-
Topic Author
- Offline
- Posts: 127
- Thank you received: 1
I searched for the user_cms_id of 105480 and there are two records using the same CMS ID. There are a total of 15 records with duplicate CMS IDs. What can be done to fix this issue? Any help is greatly appreciated. Thank you.
Mike
Please Log in or Create an account to join the conversation.
I think that such query should do the job:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- mikehermary
-
Topic Author
- Offline
- Posts: 127
- Thank you received: 1
I ran the query on the table usingPHP MyAdmin, but I get this error: #1052 - Column 'user_cms_id' in on clause is ambiguous. Any ideas?
Mike
Please Log in or Create an account to join the conversation.
Try like that:
Please Log in or Create an account to join the conversation.
I have the same problem on saving from user manager.
My situation it's a bit different: I developed the website with HikaShop so I didn't import data from other ecommerce.
My saving problem is with all users and the shop is online with orders and customers.
If I disable the synchronization plugin everything is ok.
I didn't try to execute the query you wrote, is it good for my issue too?
Regards,
Simone
Please Log in or Create an account to join the conversation.
I would recommend to try that MySQL query yes.
It won't break anything. However, it's possible that some customers might loose access to some of their orders from the frontend orders listing. So I would recommend to do a backup of the database before.
Please Log in or Create an account to join the conversation.
thank for your reply, I tried the query but it deleted nothing.
So if I try to change anything in user manager I still receive the error.
Do you have any other suggestion?
Simone
Please Log in or Create an account to join the conversation.
Try clicking on the "check database" setting of the HikaShop configuration. Maybe your problem is just that the synchronization wasn't done with the Joomla user accounts.
I don't have any other idea besides that.
Please Log in or Create an account to join the conversation.
I still have this issue on user saving if the synchronization plugin is enabled. I tried the "check database" but it didn't work.
The real problem of this situation is that users can't update/recover password.
I also tried the MySQL query you mentioned without success.
Could I give you access to the website/FTP to check it?
Or you have any other suggestion?
Simone
Please Log in or Create an account to join the conversation.
If you still have the problem, then it could be that the database structure has been messed up by something.
Please provide a backend access, a FTP access AND a PHPMyAdmin access so that we can also look at your database.
We could also need the precise procedure to reproduce the problem and a link to this thread.
You can send all that through our contact form:
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
We got all your accesses and had an extensive look at the problem today.
First, on your copy of your website, I didn't get the same error message as you. I only got the error message: "Save failed with the following error: "
The error is apparently linked to the line:
Actually, that line has been removed in recent versions of HikaShop as it was not necessary and created some issues in some cases.
Removing that line fixed the error message on your copy website.
Updating to the latest version of HikaShop would have also fixed the problem.
Please Log in or Create an account to join the conversation.
thank you really so much for support, it's superb.
Yes the problem was on saving with error you mentioned. Sorry if I didn't explain it well.
I forgot to update Hikashop, I didn't receive update notification after 2.6.2.
Thank you again Nicolas, have a good day.
Regards,
Simone
Please Log in or Create an account to join the conversation.