WordPress.org

Ready to get started?Download WordPress

Forums

Upgrade loop in admin from duplicate wp_terms (10 posts)

  1. thomgee
    Member
    Posted 6 years ago #

    Since my upgrade from 2.2 to 2.3, I cannot access my dashboard as I am stuck on the upgrade.php page asking to update the database.

    I do so and I get this kind of error :
    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')

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

    My blog has been updated, but I have lost all my categories. Any idea how to get past step 1 in the upgrade process ?

  2. thomgee
    Member
    Posted 6 years ago #

    I can bypass by commenting these lines in wp-admin/admin.php

    if ( get_option('db_version') != $wp_db_version ) {
    	wp_redirect(get_option('siteurl') . '/wp-admin/upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])));
    	exit;
    }

    But my table wp_term_relationships is not populated :(

  3. moshu
    Member
    Posted 6 years ago #

    Then your upgrade wasn't successful...

  4. thomgee
    Member
    Posted 6 years ago #

    How can I get the upgrade to get past step 1 ?

    I need to cancel the duplicate insertions in wp_terms and wp_term_taxonomy so as to continue with insertions in wp_term_relationships

  5. moshu
    Member
    Posted 6 years ago #

    I am really lost... as you could see in that other thread not even one of the Lead Developers could reproduce the error or figure out what was the reason for it. I don't know what to advise, sorry.

  6. thomgee
    Member
    Posted 6 years ago #

    My original blog was under Dotclear 1.2, before importing into WordPress 2.2.2

  7. thomgee
    Member
    Posted 6 years ago #

    ryan, any idea ?

  8. BorisMsk
    Member
    Posted 6 years ago #

    May be:

    INSERT INTO wp_terms (term_id, name, slug, term_group) VALUES ('9999999', 'Junkyard', 'general-2', '1')

  9. thomgee
    Member
    Posted 6 years ago #

    BorisMsk : I don't see what changes that does.

  10. Jeremy Clarke
    Member
    Posted 6 years ago #

    Note: I was having the same problem. If you just keep pressing the upgrade button it will continue where it left off and eventually it will finish.

    I think the problem is that those errors make the script take a long time to finish, and if you have a shitty server (my shitty server is run by Dreamhost.com) then you end up wasting your 30 second limit and the script just stops, so you have to manually restart it.

    My problem now is that once the whole thing is finished my term_relationships are all fucked up and months worth are missing.

    One solution I found was to export my DB using phpmyadmin, upgrade it inside a local wp install on my laptop (i use MAMP on mac, XAMPP is the same thing on windows), which only took like 1 second instead of 2 mintues. Then I just exported the database and imported it back into my original db. Not very efficient and pretty dangerous but stuck is stuck.

Topic Closed

This topic has been closed to new replies.

About this Topic