Duplicate Entry 0 for Key 1 [SOLVED]
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
- dancurranjr
- Joomla! Apprentice
- Posts: 8
- Joined: Tue Apr 25, 2006 8:47 pm
Duplicate Entry 0 for Key 1 [SOLVED]
I recently moved Devils Canyon Brewery to a new server, exported the old sql and reimported at the new location.
Whenever I post a new article it will not show up on the front page. The key in the table is at 0 so I have to use the sql interface and go in and manually change it to the next number (86, 87, etc).
d
Now I noticed that people cannot register:
mosuser::store failed
Duplicate entry \'0\' for key 1 SQL=INSERT INTO jos_users ( `id`,`name`,`username`,`email`,`password`,`gid`,`registerDate` ) VALUES ( . . . . . . )
Its almost like the database ddoesn't know it has records and is trying to start from scratch. Any help greatly appreciated.
Whenever I post a new article it will not show up on the front page. The key in the table is at 0 so I have to use the sql interface and go in and manually change it to the next number (86, 87, etc).
d
Now I noticed that people cannot register:
mosuser::store failed
Duplicate entry \'0\' for key 1 SQL=INSERT INTO jos_users ( `id`,`name`,`username`,`email`,`password`,`gid`,`registerDate` ) VALUES ( . . . . . . )
Its almost like the database ddoesn't know it has records and is trying to start from scratch. Any help greatly appreciated.
Last edited by dancurranjr on Mon Aug 27, 2007 10:03 pm, edited 1 time in total.
- pe7er
- Joomla! Master
- Posts: 24929
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Duplicate Entry 0 for Key 1
Use phpMyAdmin to check the table.
jos_users should have an "Next Autoindex" which should be the next ID that can be used.
With the "Operations" tab you'll get a form where you can increase the "auto_increment".
(PS: before making any changes it's recommended to backup your database).
jos_users should have an "Next Autoindex" which should be the next ID that can be used.
With the "Operations" tab you'll get a form where you can increase the "auto_increment".
(PS: before making any changes it's recommended to backup your database).
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
- dancurranjr
- Joomla! Apprentice
- Posts: 8
- Joined: Tue Apr 25, 2006 8:47 pm
Re: Duplicate Entry 0 for Key 1
Thanks, You got me pointed in the right direction.
Here is whats happening now.
I made a copy of jos_users --> jos_usersORIGINAL
and jos_comprofiler --> jos_comprofilerORIGINAL
So I am not working on the "masters"
Deleted Key 0 in both.
Went to OPERATIONS page of both and at the bottom under AutoIncrement enterd 584 (the next number)
This would let me go to the registration page and register a new member but then checking th tables the ID number was 0 again
Like I said though, you got me in the right directions - the ANSWER was to go to the STRUCTURE tab, select the ID, tell it the next number was 584 and then AUTO INCREMENT.
Did that to both tables - Wallah! Ta Da!
Then when one goes back to the OPERATIONS page youll see 584 in the bottom auto increment.
So that will help on a few random errors I have been receiving. Thank you for responding to this post. I hope my reply helps someone else!
Here is whats happening now.
I made a copy of jos_users --> jos_usersORIGINAL
and jos_comprofiler --> jos_comprofilerORIGINAL
So I am not working on the "masters"
Deleted Key 0 in both.
Went to OPERATIONS page of both and at the bottom under AutoIncrement enterd 584 (the next number)
This would let me go to the registration page and register a new member but then checking th tables the ID number was 0 again
Like I said though, you got me in the right directions - the ANSWER was to go to the STRUCTURE tab, select the ID, tell it the next number was 584 and then AUTO INCREMENT.
Did that to both tables - Wallah! Ta Da!
Then when one goes back to the OPERATIONS page youll see 584 in the bottom auto increment.
So that will help on a few random errors I have been receiving. Thank you for responding to this post. I hope my reply helps someone else!
- pe7er
- Joomla! Master
- Posts: 24929
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Duplicate Entry 0 for Key 1
You're welcome! Good to read that you've solved that problem!
PS: Could you please mark your first message in this thread as "solved" ? (Modify the first message and choose the Message Icon [solved] ).
This way the list of messages shows that the question has been solved, and other users can benefit from it.
Thanks!
PS: Could you please mark your first message in this thread as "solved" ? (Modify the first message and choose the Message Icon [solved] ).
This way the list of messages shows that the question has been solved, and other users can benefit from it.
Thanks!
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
- dancurranjr
- Joomla! Apprentice
- Posts: 8
- Joined: Tue Apr 25, 2006 8:47 pm
Re: Duplicate Entry 0 for Key 1
Ok . . . . I'm not seeing a message solved icon in the first message. . .
-
- Joomla! Apprentice
- Posts: 19
- Joined: Sat May 17, 2008 1:39 am
Re: Duplicate Entry 0 for Key 1 [SOLVED]
You guys are awesome.. after days.. of searching this did it .. although i couldnt find it searching here had to google it and redirect here..anyways even though this is a 5 year old post it worrked perfecto!
thanks,
John
thanks,
John
-
- Joomla! Apprentice
- Posts: 19
- Joined: Sat May 17, 2008 1:39 am
Re: Duplicate Entry 0 for Key 1 [SOLVED]
jnba wrote:You guys are awesome.. after days.. of searching this did it .. although i couldnt find it searching here had to google it and redirect here..anyways even though this is a 5 year old post it worrked perfecto!
thanks,
John
Correction.. it worked but the users are not listed in User manager..no im lost again..
any ideas..?
-
- Joomla! Apprentice
- Posts: 19
- Joined: Sat May 17, 2008 1:39 am
Re: Duplicate Entry 0 for Key 1 [SOLVED]
Update... in order to get this working i had to manually back up my local database and upload it to the live server.. now its working perfectly, i do not know the reasons for this but hopefully in the future someone will post a perm fix .. thanks all.jnba wrote:jnba wrote:You guys are awesome.. after days.. of searching this did it .. although i couldnt find it searching here had to google it and redirect here..anyways even though this is a 5 year old post it worrked perfecto!
thanks,
John
Correction.. it worked but the users are not listed in User manager..no im lost again..
any ideas..?
- sunshine1688
- Joomla! Apprentice
- Posts: 23
- Joined: Mon Jun 27, 2011 1:59 pm
- Location: Thailand
- Contact:
Re: Duplicate Entry 0 for Key 1 [SOLVED]
I just saw the same problem on Joomla 3, but after force refreshed the page, thing going to normal.