"Warning: Duplicate entry" errors - getting lots of them
fumbling - December 21, 2008 - 03:07
I've been getting "Warning: Duplicate entry" errors quite often. They're not always the same, so not sure I should post one here (and they're as long as 13 pages when pasted into a text doc, yikes), but they seem to be a database-related issue. Is there a module you would recommend for diagnosing database errors like this and fixing them? Or any other thoughts?

are u using only the core
are u using only the core modules, or any non-core modules, or any 3rd party modules?
It would definitely help to
It would definitely help to post a dozen of those error messages, the first ones, and also to describe one specific case where this happens, what is the URL, what you are doing etc. That could help locate the problem.
Thanks. Here are a few
Thanks. Here are a few lines. Note that I've seen this error again with entirely different content though, so really not sure. I haven't touched Core, although I certainly have a lot of contributed modules in sites/all/modules, one of which I'm guessing is the problem. Thanks again for helping me out here:
• user warning: Duplicate entry 'admin/advanced_help' for key 1 query: INSERT INTO menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('admin/advanced_help', '', '', 'user_access', 'a:1:{i:0;s:24:\"view advanced help index\";}', 'advanced_help_index_page', 'a:0:{}', 3, 2, '', 'admin/advanced_help', 'Advanced help', 't', '', 6, '', '', '', 9, '') in /var/www/html/includes/menu.inc on line 2385.
• user warning: Duplicate entry 'autotag/autocomplete' for key 1 query: INSERT INTO menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('autotag/autocomplete', '', '', 'user_access', 'a:1:{i:0;s:19:\"create node content\";}', 'autotag_autocomplete', 'a:0:{}', 3, 2, '', 'autotag/autocomplete', 'Autocomplete autotag thingumy', 't', '', 4, '', '', '', 0, '') in /var/www/html/includes/menu.inc on line 2385.
Yeah, well reading the error
Yeah, well reading the error is the first step in diagnosis - so knowing what table was being accessed at the time and the query involved would be sorta invaluable.
Just one or two lines would be enough...
In general - with the paucity of information available - "duplicate entry" is usually a symptom of the 'sequences' table getting out of sync - which is usually caused by partial migrations or unsyncronized restores from backups.
.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |
Or, in the case of Drupal 6
Or, in the case of Drupal 6 it may be a wrong autoincrement value in some tables.
subscribing
I seem to be getting the same duplicate entry errors, lots of them.
I just updated a bunch of
I just updated a bunch of modules and ran update.php. I get 42 pages of "user warning: duplicate entry...."
here's the first few... The site seems to work OK despite all the warnings. Should I just ignore them?
I uploaded and set up the
I uploaded and set up the Invite module today and got this warning messenger...
is there something i could do manually in myphp admin..? or any other idea?
-----------------------------------------
enjoy your day,
André Noronha
subscribe
subscribe