Closed (fixed)
Project:
Drigg
Version:
5.x-1.20
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Mar 2008 at 22:36 UTC
Updated:
10 Apr 2008 at 09:34 UTC
Jump to comment: Most recent file
I'm trying migrate from Pligg to Drigg. At the moment, I was able to transfer all the materials and users from Pligg with help 'Pligg -> Drigg importer', but there is a problem with the registration of the new users in Drupal.
After submitting the registration form, the system gives an error (look below) and a new user is NOT created, BUT a mail with the one-time login link still goes (!). As a result, the not registered user can change the password for different registered user (in my example with uid = 5).
This error message with wrong SQL query:
user warning: Duplicate entry '5' for key 1 query: INSERT INTO linux2_users (name, mail, pass, init, status, uid, created) VALUES ('777', 'oc@nm.ru', '9c2c94d1762a425f106d6420212bf663', 'oc@nm.ru', 1, 5, 1205704690) in /home/lighttpd/localhost/includes/database.mysql.inc on line 172.
After importing users from Pligg, Drupal try create new users with uid starting from 1 (at import proccess we have only one main user in system).
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | drigg.patch | 6.34 KB | sikjoy |
Comments
Comment #1
mercmobily commentedHi,
I don't get this.
I observed the very same problem with my own import. And yet, the code seems to be right...
After importing the users, the import script has:
However, either one of these queries surely fails... randomly. Sometimes.
Ugh.
Anyway, if this happens, just run:
SELECT max(uid) FROM users;
See what comes out. If the number for example is 1200, then run:
UPDATE sequences set id=1200 WHERE name='users_uid';
BUT, just check that the sequence table is OK. For example in Drigg I have:
If some of these are low (like node_nid), you have a problem...
Please report back here!
Merc
Comment #2
osminogin commentedHey man, you have a error in you code
Look at my {sequences} tables fileds and you see why you db query wrong (for me)
I think this is not the only place in the Drigg code where there is a problem with database prefixes...
What do you think about the fact that Drupal sends a mail with registration data while it is not checking the user actually created?
// wbr
Comment #3
osminogin commentedI hope that all places in code...
Comment #4
sikjoy commentedaccepting assignment
Comment #5
sikjoy commentedosintsev, you egrep ninja you!
Keep in mind that this patch should be applied against 5.x-1.20. I don't have any pligg data to check this against. Could someone be so kind as to test this for me?
--sicjoy
Comment #6
sikjoy commentedI see this patch has already been committed. Marking fixed.
Comment #7
mercmobily commented