[documentation] [Documentation feature] page on sequences table
(duplicate entry errors) in troubleshooting faq
rivena
drupal-docs at drupal.org
Sun Jun 11 20:13:11 UTC 2006
Issue status update for
http://drupal.org/node/64057
Post a follow up:
http://drupal.org/project/comments/add/64057
Project: Documentation
Version: <none>
Component: Installation
Category: feature requests
Priority: normal
Assigned to: rivena
Reported by: rivena
Updated by: rivena
Status: patch (code needs work)
If this is OK as is, I will submit it to the handbook as a page.... ?
Anisa.
rivena
Previous comments:
------------------------------------------------------------------------
Wed, 17 May 2006 13:42:26 +0000 : rivena
I think it would be a *fab* idea to have a page on this in the trouble
shooting faq.
I will write up a page; if you all know of some forum topics that
reference this problem (same problem, so many different errors!),
please post them with this issue.
Anisa.
------------------------------------------------------------------------
Wed, 07 Jun 2006 18:44:23 +0000 : rivena
Here is my rough draft! I removed the formatting so you can see it in
your email.
In addition, I think new links/info on the following would be good:
HOWTO: Access your database
HOWTO: Edit your database
Other forum examples of errors.
Explanation for why this happens.
-------------------------------
PLAIN TEXT VERSION
This page is for errors similar to the one below:
user error: Duplicate entry '24' for key 1
query: INSERT INTO node (status, moderate, promote, sticky, title,
body, format, uid, created, type, teaser, changed, nid) VALUES('1',
'0', '1', '0', 'test', 'this is a test', '1', '1', '1149692821',
'story', 'this is a test', '1149692832', '24') in
.../includes/database.mysql.inc on line 66.
warning: Cannot modify header information - headers already sent by
(output started at .../includes/common.inc:384) in
.../includes/common.inc on line 192.
The problem (short form): At some point, the sequence table in your
Drupal database was not updated.
The solution
1. Access your database. Check the affected table. In this case, the
error tells us that it is the nodetable (query: INSERT INTO node). This
also happens with other tables, modify these instructions accordingly.
2. This is the node table, so the problem is the node id (nid). Each
node has a unique id. Look at your table, and find the highest node id
(nid). If you have many nodes, it may help to sort your table by nid to
find the highest one.
3. Go to your sequences table. Change the node id in the sequences
table to a number higher than the id you found in step 2.
Voila!
----------------------------------
I would call this 'Duplicate entry error' and put this in the
Troubleshooting FAQ. Please let me know what you think.
Anisa.
More information about the documentation
mailing list