WordPress.org

Ready to get started?Download WordPress

Forums

'duplicate key' errors when upgrading from 2.2.3 to 2.3 (10 posts)

  1. prwood
    Member
    Posted 6 years ago #

    Greetings,

    I'm attempting to upgrade my WordPress install from 2.2.3 to 2.3. When it tells me that my database needs to be upgraded, I get the same errors as mentioned in this thread:

    http://wordpress.org/support/topic/135522?replies=17

    Although that thread is marked as resolved, I wasn't able to find anything in it that could help me. I have already checked for conflicting plugins, and disabled my plugins anyway for good measure. I also tried restoring the database from my last backup and running the upgrade again, to no avail.

    Any suggestions on what I can do to complete the upgrade?

    Thanks,

    Peter

  2. MichaelH
    Member
    Posted 6 years ago #

    Can you post an example of those errors.

    If it is duplicate key errors for term_relationships they can be ignored. Also, that problem is resolved in Trac ticket 5223.

  3. prwood
    Member
    Posted 6 years ago #

    Here's an example:

    WordPress database error: [Duplicate entry '1' for key 1]
    INSERT INTO www_terms (term_id, name, slug, term_group) VALUES ('1', '1_Uncategorized', 'uncategorized-3', '1')
    
    WordPress database error: [Duplicate entry '1-category' for key 2]
    INSERT INTO www_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('1', 'category', '', '0', '0')
    
    WordPress database error: [Duplicate entry '66' for key 1]
    INSERT INTO www_terms (term_id, name, slug, term_group) VALUES ('66', 'Site Updates', 'site-updates-2', '1')
    
    WordPress database error: [Duplicate entry '66-category' for key 2]
    INSERT INTO www_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('66', 'category', '', '0', '74')
    
    WordPress database error: [Duplicate entry '67' for key 1]
    INSERT INTO www_terms (term_id, name, slug, term_group) VALUES ('67', 'Food', 'food-2', '1')
    
    WordPress database error: [Duplicate entry '67-category' for key 2]
    INSERT INTO www_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('67', 'category', '', '0', '32')

    There's no way to ignore it as far as I can tell; going back to wp-admin just takes me back to step 1, and the failed database upgrade repeats again...

  4. MichaelH
    Member
    Posted 6 years ago #

    Did you ever upgrade to a beta version of WordPress, such as the 2.2-beta at sometime in the last year?

  5. prwood
    Member
    Posted 6 years ago #

    Not that I can recall. As far as I know, I've only run production versions of WordPress.

  6. MichaelH
    Member
    Posted 6 years ago #

    So the database upgrade never happens.

    Hopefully you do have a backup. Might consider restoring to that backup, then waiting for 2.3.1. I know that's a worthless answer...

  7. prwood
    Member
    Posted 6 years ago #

    Yeah, I think I'll just wait for 2.3.1. We'll see what happens then...

  8. prwood
    Member
    Posted 6 years ago #

    Ok, so I tried an upgrade from 2.2.3 to 2.3.1. I dropped the terms, term_taxonomy,a nd term_relationships tables which the previous upgrade had created, then ran through the upgrade script.

    After churning for a bit, I was left on a blank screen with no options to continue. So I reloaded the upgrade script, which again prompted me to upgrade the database. At that point, I got the same database errors that I got before.

    So it seems that on the first run through, there is something that doesn't finish cleanly. Then, when I try to re-run it, it's unable to get past inserting the data into the terms tables since that's already been done.

    Any thoughts?

  9. prwood
    Member
    Posted 6 years ago #

    (Should have said I tried an upgrade from 2.2.3 to 2.3.1-RC1, not 2.3.1... just because I was impatient)

  10. patrox
    Member
    Posted 6 years ago #

    Same problem over here, we're stuck to a version 2.2.x

    Still no fix around :S

    pat

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.