Duplicate entry on ...
 
Notifications
Clear all

Duplicate entry on fanfiction_authorinfo creating new users

6 Posts
3 Users
0 Reactions
1,989 Views
 Sue
(@sue)
Posts: 131
Estimable Member
Topic starter
 

URL to your eFiction: http://fictioning.net
Version of eFiction: 3.3
Have you bridged eFiction, if so with what?: None
Version of PHP:  4.4.1
Version of MySQL:  MySQL client version: 4.1.10
Have you searched for your problem: Yes
If so, what terms did you try: fanfiction_authorinfo

I'm just testing my efiction installation - I have moved it from a "test" directory to its new home (copied all files from subdirectory to the root directory). Everything went fine except when I try to create a new test user, I get the error:

A fatal MySQL error was encountered.
Query: INSERT INTO fanfiction_authorinfo(`uid`, `info`, `field`) VALUES('', 'Yes', '8');
Error: (1062) Duplicate entry '0-8' for key 1

I seem to get the error whenever I try to register as a new user. I have used different username & email addresses each time. The information is being stored, but the "new users" aren't getting their passwords emailed to them.

I tried repairing the database - it reported no errors.


 
Posted : 05/07/2007 6:33 pm
(@itanshi)
Posts: 381
Reputable Member
 

when moving or restoring from a backup, you may end up with a duplicate admin account, delete the old entry and reupload the .sql


I am rebuilding efiction! Join us on irc! #efiction at www.mibbit.com Instructions for irc πŸ˜€ Alpha released!

 
Posted : 05/07/2007 7:44 pm
 Sue
(@sue)
Posts: 131
Estimable Member
Topic starter
 

Thanks for the reply, itanshi but I don't really understand.

I've looked in the database and there's only the four users I've created so far (2 before the move, 2 after). I'm not sure what .sql I'm uploading.


 
Posted : 06/07/2007 5:28 am
(@tammy)
Posts: 2577
Member Moderator
 

It's a bug in the script.  In user/editbio.php change $uid to $useruid on line 95.


if(!empty($_POST["af_".$field['field_name']])) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorinfo(`uid`, `info`, `field`) VALUES('$useruid', '".escapestring($_POST["af_".$field['field_name']])."', '".$field['field_id']."');");

It'll be fixed with 3.3.1 which should be coming soon.  I need to do a couple tests, but RL is busy and haven't gotten to them yet.


 
Posted : 07/07/2007 3:52 am
 Sue
(@sue)
Posts: 131
Estimable Member
Topic starter
 

Thanks Tammy, updated the file but now I get a new error:

A fatal MySQL error was encountered.
Query: INSERT INTO fanfiction_authorinfo(`useruid`, `info`, `field`) VALUES('', 'Yes', '8');
Error: (1054) Unknown column 'useruid' in 'field list'


 
Posted : 07/07/2007 8:04 am
(@tammy)
Posts: 2577
Member Moderator
 

You updated it wrong.  You need to change $uid to $useruid not uid to useruid.  Note the $ at the front.  Copy the line I posted exactly.


 
Posted : 09/07/2007 12:57 pm
Share: