ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

1062 Errors on v1-v2 upgrade....

August 29, 2011 7:37am

Subscribe [3]
  • #1 / Aug 29, 2011 7:37am

    Okapi Creative

    384 posts

    This question may be related to a resolved thread.

    Have run into two separate but possibly connected problems which prevent a successful upgrade from the last 1.7 version to the latest 2.2 version. The first problem is the same as in the resolved thread above and relates to duplicate entries in several tables which stop the upgrade in its tracks with the above 1062 error.

    A Database Error Occurred
    Error Number: 1062
    Duplicate entry '17' for key 1
    ALTER TABLE `exp_member_homepage` ADD PRIMARY KEY `member_id` (`member_id`)
    Filename: updates/ud_200.php
    Line Number: 1428

    I have followed the instructions in the related thread linked above and it does install but throws another different error.

    This is the procedure followed: the site is a live one on EngineHosting, was running 1.5 (actually this site has had many updates from the earliest EE versions) but I updated to the final 1.7 version in preparation. All went well and I downloaded the DB and installed a clone of the site on my local machine. The idea is/was to leave the site live as 1.7 (because it is being constantly updated with content) while I a) did a redesign of the main design and b) updated to 2.2 on my local machine before in about a month’s time upgrading the live site and uploading new design.

    First Error as in related thread above

    These errors are occurring on my local machine but the database where the duplicates exist is the same - ie a downloaded copy - of the live one.

    As mentioned, the error stalls and aborts the install. Each time I fix it by removing the duplicates.

    So the first occurrence is as in code shown above: exp_member_homepage - I remove the duplicates vie PhpMyAdmin, save the database and reload it and try again.

    It happens again with the “upload_no_access” table. Fix as above.

    It happens again with “exp_members_folders” table. Fix as above. After this the install DOES proceed as it should and all seems ok. BUT when trying to view site or CP I get a second error:

    Error 2

    This is a notice that is a blank page with the error:

    Site Error: Unable to Load Site Preferences; Invalid Preference Data

    This is as far as I have got. Could someone point me in the right direction to troubleshoot it? I think the best way to go would be to try to remove these duplicates on the live server and then download this to do the update locally to EE2.

    Alternatively, does anyone know if EngineHosting offer a service to upgrade (paying is ok) or could facilitate the upgrade from v1 - 2?

  • #2 / Aug 29, 2011 6:07pm

    Kevin Smith

    4784 posts

    Hi tarquin,

    You took the right steps to get through the upgrade with what appears to have been a somewhat corrupt database. For reference, you may want to bookmark this wiki article: Troubleshooting Upgrade Errors

    It seems to me that your upgraded site is probably fine, but you just have something missing from your admin.php file.

    Is this an MSM install?
    Have you checked the path for $system_path in your admin.php file?
    Have you made sure your index.php and admin.php files are both EE 2 files and not artifacts from EE 1?
    Is the front-end of your site working?
    If not, have you checked to ensure your database credentials are correct?

    If you’re comfortable looking into your database directly, is there a bunch of jumbled text in all the database fields in the ‘exp_sites’ table that end with ‘_preferences’?

    To answer your final question, I don’t believe EngineHosting provides that, but it might be a worthy question to ask them directly.

  • #3 / Aug 30, 2011 11:48am

    Okapi Creative

    384 posts

    HI Kevin

    I think that nailed it! I started over with the fixed database and did a fresh upgrade to v2 with a new download. I guess some of the old v1 elements had snuck in.

    All fixed now, thanks for the help!!

  • #4 / Aug 31, 2011 4:31am

    John Henry Donovan

    12339 posts

    Glad you are up and running again. Feel free to start anew thread if you have any more questions

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases