error : duplicate entry
Liliplanet - May 16, 2008 - 10:29
| Project: | membership |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hi, I'm constantly receiving this error:
user warning: Duplicate entry '4127-3' for key 1 query: INSERT INTO users_roles (uid, rid) VALUES (4127, 3) in /home/mysite/includes/database.mysql.inc on line 172.
What could create this please?
Also is it possible to have different roles to use membership, as currently can only select 1.
Look forward to your reply.
Lilian

#1
The only way I can reproduce this when you are using the membership module to add a user to a role that he/she is already member of. This "bug" is already known and addressed in "Ideas to be implemented": README's last line says "Prevent changing the time-limited role's membership through other (core Drupal) forms."
Regarding to your other problem: no, the membership module can handle only one role's membership at the moment. I have been thinking about expanding it to support more role's membership, but I don't have the time to implement it nowadays.
#2
Thank you Booba for your reply. Well, that's exactly what happened. I updated the membership for users through your module, never saw "Ideas to be implemented".
The huge problem remains though, it removed the CCK categories forms for users to select in their profile.
Devastated here, have been working on it for more than 6 months. Is there any way to retrieve the categories to show in the edit profile without deleting the whole site and starting again .. please any help would be most appreciated.
Thank you Booba. Lilian
#3
I can't see any bit of code in membership.module which should be related to CCK and/or categories and/or CCK categories - as I have stated at http://drupal.org/node/259260#comment-846422 -, so I can't even imagine what should be retrieved.
#4
#5
I recommend to check your tables in phpmyadmin for example, to see what are you inserting and where. Also remember that the primary key fields must have unique values.
#6
Thank you for your reply. What I'm doing is creating a completely new content type and starting again with having to import all the users. Quite some time lost, but it has to be done. A new content type .. and everything is fine.
Wishing you a great weekend.
Lilian
#7
Fixed in the just-committed UX improvements.
#8
Automatically closed -- issue fixed for two weeks with no activity.