• Resolved Keilya

    (@fantasycrusader)


    Heya guys I tried to upgrade to 2.3 today, followed every instruction in the extended upgrade instructions.

    Tried to click “Upgrade” when I visited my blog admin and here is what it gives: (Just some examples)

    WordPress database error: [Duplicate entry ‘1’ for key 1]
    INSERT INTO wp_terms (term_id, name, slug, term_group) VALUES (‘1’, ‘Junkyard’, ‘general-2’, ‘1’)

    WordPress database error: [Duplicate entry ‘1-category’ for key 2]
    INSERT INTO wp_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES (‘1’, ‘category’, ‘This is where all the VERY BORING posts go. You have been warned.’, ‘0’, ’83’)

    WordPress database error: [Duplicate entry ‘3’ for key 1]
    INSERT INTO wp_terms (term_id, name, slug, term_group) VALUES (‘3’, ‘Helda Chronicles’, ‘the-helda-chronicles-2’, ‘1’)

    WordPress database error: [Duplicate entry ‘3-category’ for key 2]
    INSERT INTO wp_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES (‘3’, ‘category’, ‘A daily(if I should update) story about the adventures of my little Helda, in Maple Story. ^_^ This category has ceased posting as of 23rd August 2005.’, ‘0’, ‘6’)

    WordPress database error: [Duplicate entry ‘4’ for key 1]
    INSERT INTO wp_terms (term_id, name, slug, term_group) VALUES (‘4’, ‘Dream Memoir’, ‘dream-memoir-2’, ‘1’)

    It seems as if the categories are having a little problem? How can I solve this? I have acccess to phpMyadmin.

    To view the rest of the errors, simply visit: http://akichigo.org/wp-admin/ and click upgrade. =S

    Any help is greatly appreciated!

Viewing 15 replies - 1 through 15 (of 28 total)
  • *Sigh* perhaps you should look around for similar cases because this has been widely reported, it’s not a bug. It is simply a plugin not updated to be compatible with WP’s new database tables.

    http://wordpress.org/support/topic/135512

    Thread Starter Keilya

    (@fantasycrusader)

    Hi

    I’ve deleted ALL plugins off my server except for Akismet and I’m still getting the same error…There are no more plugins left to blame.

    Also I did do a search, but there wasn’t any “duplicate entries” error specific to the 2.3 upgrade.

    Please help! >_<

    You’re not alone. Just curious, did you import your UTW tags to WP tags, BEFORE trying to upgrade your blog? This issue happened to me as well. This has also come up a few times on the wp-testers email list as well. I just sent an email regarding this post and issue to the list again. Hopefully someone will have an answer soon!

    Thread Starter Keilya

    (@fantasycrusader)

    Thank you for your reply.

    I have used the UTW tag plugins once but I
    discontinued the use of it sometime back.

    I did not convert UTW tags to WP tags. How do I import the UTW tags to WP Tags if it will solve the problem? (If it’s not too late to do it. I still have the database backup and the previous version of WP.)

    Or is there a way which I can drop all the tags together if it will SOLVE the problem? >_<

    I’ve read how you solved it on your blog:

    a) backing up the whole database, b) made a general content export/import xml file, c) deleted database, d) reinstalled 2.3 fresh, e) then imported all my posts, comments and etc etc

    I don’t quite understand how this is done exactly, especially from step b onwards. Any advice would be greatly appreciated. >_<

    Send me your backup, and I can take a look. ryan at boren dot nu

    Hmm, this looks like the part of the upgrade that updates the tables is being run twice.

    Since you have phpmyadmin access, can you look to see what the value of db_version is in the wp_options table. Also browse the wp_terms table and see if any of your categories are in there.

    If you ever upgraded to an alpha or beta version of 2.3, reverted to 2.2, and then upgraded to 2.3 again, you might see this.

    fantasycrusader, don’t worry about what I had done on my blog there. Ryan is a lead developer, you’re in better hands with him, than me. I’m not going to confuse the matter, or make it even more worse than it is. Follow Ryan okay? =)

    Ryan, when I had the 2.2-alpha (with WP tags) at that time before you reverted it and removed tags from it. I then went straight to 2.3-alpha on my site. I had also done a UTW tags to WP tags convert as well. Then I got those errors. Just throwing that out to you.

    Thread Starter Keilya

    (@fantasycrusader)

    Hi I’m in the process of sending you the backup. It’s quite large and hotmail didn’t allow me to attach it. I’m looking into “db_version is in the wp_options” and “wp_terms table” right now. Shall edit this post when I have the figures.

    PS. I have never installed any alpha and beta versions of WP. They’re waay too big for me to handle.

    Spencer: Got it!

    Thanks!

    [edit] I can’t seem to figure out where I can get “db_version” from the options table. Here is a screenshot of it: http://akichigo.org/options.jpg

    My categories are appearing in the terms table if that helps. =/ (But not all of them. It stops halfway.)

    I’m sending the database file via yousendit.com it should have safely reached your inbox by now.(:

    I upgraded your database just fine. Even with the DB errors you are seeing, the upgrade should complete. However, your upgrade is not completing, which is why it keeps wanting to run again. Even when I simulate an upgrade gone wrong, doing another upgrade completes despite the error messages about duplicate entries.

    So, can you backup your current database so we can see what has gone wrong in there? Thanks for helping us debug. I hope we can get you going soon.

    To update everyone, fantasycrusader sent a backup of the partially upgraded database. I was able to complete the upgrade with that database too. I’m suspecting that fantasycrusader’s upgrade is dying mid-upgrade for some reason. I’m not able to reproduce that reason. I sent a backup of the tables I upgraded as a workaround.

    Thanks for the update Ryan. Just curious, if this issue continues to come up then, what should we say to such users and or, where should we point them regarding this issue? I mean, as in to explain any possible solution… This post maybe, or…? Thanks in advanced.. =)

    Thread Starter Keilya

    (@fantasycrusader)

    Thanks for the help! Truly! I don’t get what’s going on fundamentally but I know WordPress is up and working for me again. ^^

    Thanks!

    In response to:

    http://wordpress.org/support/topic/135522?replies=15
    [resolved] [Urgent!] 2.3 Upgrade Error “WordPress Database Error Duplicate Entry”

    We had similar problems (upgrading from 2.0.4 to 2.3) for halfwaytoconcord.com with the MYSQL database being corrupted during upgrade.

    First step was to upgrade to 2.1– to be able to utilize Export function ( to create XML file w/all posts, pages, categories , comments and users).

    Followed instructions from Codex: http://codex.wordpress.org/Upgrading_WordPress_Extended

    When upgrading form 2.1 to 2.3, we got to step #9 (running the install.php ).

    WordPress database error: [Duplicate entry ‘1’ for key 1]

    Were unable to upgrade to 2.3. Then we created a new MYSQL database and a fresh install of 2.3.

    There was still a problem. After referencing the error I reviewed the .htaccess file and found that it had been corrupted during the upgrade.

    After restoring the .htaccess file we were able to successfully install 2.3 clean and then import all the data via XML file.

    Hopefully this will be of use to someone else out there.

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘[Urgent!] 2.3 Upgrade Error “WordPress Database Error Duplicate Entry”’ is closed to new replies.