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.

error message running Update Wizard

January 28, 2012 10:55pm

Subscribe [3]
  • #1 / Jan 28, 2012 10:55pm

    johnnyb

    45 posts

    This is a continuation of a pre-existing thread.

    Following instructions for updating to v1.7.1 (from 1.4.1.),
    I started Update Wizard. It went through versions up to 1.5.? (not sure which one)
    and then stopped with the following error message

    Error: The following error was encountered
    MySQL ERROR:

    Error Number: 1050

    Description: Table ‘exp_sites’ already exists

    Query: CREATE TABLE `exp_sites` ( `site_id` int(5) unsigned NOT NULL auto_increment, `site_label` varchar(100) NOT NULL default ‘’, `site_name` varchar(50) NOT NULL default ‘’, `site_description` text NOT NULL, `site_system_preferences` TEXT NOT NULL , `site_mailinglist_preferences` TEXT NOT NULL , `site_member_preferences` TEXT NOT NULL , `site_template_preferences` TEXT NOT NULL , `site_weblog_preferences` TEXT NOT NULL , PRIMARY KEY (`site_id`), KEY `site_name` (`site_name`))
    ExpressionEngine by EllisLab - © Copyright 2003 - 2011 - EllisLab, Inc. - All Rights Reserved

    The Wizard is stopped. What do I do to fix this and resume the Update Wizard?next?

  • #2 / Jan 30, 2012 3:58pm

    Shane Eckert

    7174 posts

    Hello Johhnyb,

    I am sorry to hear you are running into this issue.

    It looks like there are some artifacts in your database from the upgrade. See this troubleshooting article for some background on this sort of thing.

    The best thing to do is roll back to before you started the upgrade. Before you restore your database you should wipe your database by dropping all the tables (make sure the DB is completely clear) and then proceed.

    I hope this helps!

    Cheers!

  • #3 / Jan 30, 2012 10:36pm

    johnnyb

    45 posts

    Hi Shane. Thanks for answering. This topic should probably be combined with the one at
    http://ellislab.com/forums/viewthread/209702/, which please see. (The original responder to that post stopped replying, and I thought the topic was “dead,”  so I started this new one that you’re replying to. 
    But then Sean Smith replied to the original topic - with the same link to “Troubleshooting Upgrade Errors” that you’ve recommended, and the same recommendation to wipe the database tables. )
    However, as I said in my reply to Sean, the troublesome exp_sites table that caused the Wizard Error Message was not in the database before the Wizard was run. Therefore, it must have been added by the Wizard in an earlier update stop. This seems like a total Catch-22 - the Wizard adds “artifacts” in an early update that causes itself to fail when doing a later update!  How would clearing the tables change that?  And even if I did clear the tables, how would I restore the content data (from a backup, I presume) without undoing the changes that the Wizard made? Wouldn’t the un-updated backup overwrite what the Wizard did?

    PS. By the way, the current version of the updated database (at the point the Wizard stopped) shows as v1.6 in the EE Control Panel (I can get to the opening page, then I get another error message. So the update version I got to before the error message was not 1.5, as I said earlier, but more likely 1.6.5. I remember the final digit of the last update button I clicked was 5.  Don’t know if that helps any but I’m trying to be as accurate as possible.

  • #4 / Feb 01, 2012 7:05pm

    Shane Eckert

    7174 posts

    Hello johnnyb,

    Sorry about the delay.

    I see that you did start this in another thread.

    I am going to run this by a few other Customer Advocates. I did not want you to think I had forgotten you. I will have more for you ASAP.

    Thank you,

  • #5 / Feb 02, 2012 12:02pm

    Shane Eckert

    7174 posts

    Hello johnnyb,

    Do you have a backed up version of your database from before you started the upgrade?

    If so, can you please start the upgrade process again by rolling back to before the first upgrade. After you upgrade to the next , please check you database before you import making sure all the tables are gone. Then import your backed up database.

    From what I am hearing it is possible that you may have backed up the database at one of the upgrade stops and that backup might be corrupt and so this database error keeps getting introduced into the process when you import. Does that makes sense?

    I will be on the lookout for your response.

    Thank you,

  • #6 / Feb 02, 2012 3:48pm

    johnnyb

    45 posts

    Do you have a backed up version of your database from before you started the upgrade?

    Yes my ISP does backups daily, and I was sure to make my own per the Update (this is an Update, not an Upgrade) instructions at http://expressionengine.com/legacy_docs/installation/update.html - which I’ve followed exactly.

    If so, can you please start the upgrade process again by rolling back to before the first upgrade. After you upgrade to the next , please check you database before you import making sure all the tables are gone. Then import your backed up database.
    From what I am hearing it is possible that you may have backed up the database at one of the upgrade stops and that backup might be corrupt and so this database error keeps getting introduced into the process when you import. Does that makes sense?

    Finally the light is dawning for me. Apparently the Wizard only updates the ee database structure, not any content added by the user. What threw me off was that the cited instructions say nothing at all about emptying all tables, including content, from the database before running the Wizard. Therefore, I figured the Wizard probably does something to the content as well and I should leave the database as it is, content and all.

    It seems clear that this “artifacts from the update” problem is entirely caused by the Wizard itself. The cited instructions should really include, as part of Step 1, Prepare for the Update, a final step, Clear all tables from your database, with instructions on how to do this, and an additional step between 4 and 5: Import your backed-up Database, again with instructions. Obviously there’s a difference between simply restoring the backed-up database (structure and all) and importing the data into the newly updated database structure.

    That’s the key phrase that cleared this up for me: “import your backed up database.” Thank you.  It’s the first time in this or the other thread that anyone has said anything like that.  Am I understanding the situation properly now?

    I’m also concerned to be sure what you mean by

    After you upgrade to the next , please check you database before you import making sure all the tables are gone.

    The Wizard runs through the update versions very quickly, each one taking only a few seconds, and the only possible forward option I recall is a button at the bottom saying “Continue to [the next version].” Do I really have to abort the Wizard at each specific version update to check the database for tables? If so, if that’s even possible, how?  Just close the window with the top right x?  I’d hope the Wizard could run to completion* without the need to check tables. If it really needs aborting and tweaking at every step, “Wizard” is hardly the word I’d choose to describe it. 😉

    Finally, never before having imported an EE database, I have no clue how to do this. :-(
    Please give me or refer me to exact instructions, and if I’ve understood properly, this problem will soon be resolved.

    Thank you,

    JB

    *PS. What’s the last version of 1.x, the one I should end up with when the update is done - 1.7.1?

  • #7 / Feb 03, 2012 2:09am

    Shane Eckert

    7174 posts

    Hello johnnyb,

    I think some line are getting crossed. 😊 I apologize for that.

    There are two roadmaps involved here and some steps are getting confused. One roadmap is for updating, the other roadmap is for when you encounter an error and have to make a u-turn and do the update again.

    The database backup is just in case something goes wrong. A normal update will typically just run throughout the steps and never need you to import the database.

    To clarify - do not stop the update from running. Let it run it’s course.

    When Sean and I mention artifacts, this is what we mean.

    ExpressionEngine’s Upgrade Wizard changes the structure of the database by adding and removing tables, columns, and keys. If an upgrade attempt fails, those database changes are still present in the database. After a failed upgrade, you may have restored your database and gotten ExpressionEngine working again at the version from which you were originally trying to upgrade, only to become doubly frustrated when a second attempt at an upgrade failed again with even more errors.

    The above information is from the Troubleshooting Upgrade Errors article. The explanation goes on if you are curious.

    I think the best thing to do now, to move forward, is to roll back to before you started the upgrade and follow this guide. You mentioned that your hosting services does backup, so you can go back to before this all started, which means the files and the database are just as they were.

    If you run into a problem during the upgrade, then stop and update this thread and we can go from there.

    I am happy to clarify anything that does not makes sense, we are here to make your experience with ExpressionEngine awesome and I want to make sure things go well for you. I will be keeping an eye out for any updates to this thread.

    Lastly, the latest 1.X version of ExpressionEngine is 1.7.1.

    Regards,

     

  • #8 / Feb 03, 2012 10:17am

    johnnyb

    45 posts

    Thanks Shane.  I appreciate the support you’re giving me, and I’m really glad to hear I don’t have to stop the Wizard.  I do understand what the Wizard does and what the “artifacts” are.  I read the Troubleshooting Errors document last week, as soon as it was suggested in the other thread, and what I’ve been following installation update guide that you referenced, and that I suggested improving for in my last post, all along, each step exactly as described.

    My hesitation re: clearing tables is really centered around how to get them back after the Wizard completes. The tables in my database contain the the entire content of my web site, and there’s no way I’m going to clear them all, regardless of how many backups I have, until I understand how to get them back after the UPdate. Restoring the backed-up database isn’t going to work - it would undo everything the Wizard has updated, no?  This is the “catch-22” I kept referring to. 

    When you mentioned that the data should be imported rather than restored, I finally saw the light. Unfortunately, however, I don’t know how to import a backed-up EE database/  I’ve never had occasion to do that before, and I’d be guessing all the way. I don’t even know where to start - the EE control panel, or the PhyMyAdmin panel accessed from my ISP’s Plesk?  (The latter is where I figure I should clear the tables - I haven’t ever done that before with an EE database either, but it seems a lot simpler than importing tables from another database.)  Really, I have only the faintest of clues, and obviously I don’t want to import backed-up tables that would overwrite the ones the Wizard has updated. 

    JB

  • #9 / Feb 04, 2012 1:11pm

    johnnyb

    45 posts

    Update: Having received no response since my last post, I researched clearing tables, dropping and emptying tables, and importing and exporting in phpMyAdmin. Then:
    1. I went into my database (eedev) and Dropped all the tables.
    2. Ran the Wizard.
    3. Got this error:

    Error: The following error was encountered
    MySQL ERROR:
    Error Number: 1146
    Description: Table ‘eedev.exp_weblogs’ doesn’t exist
    Query: ALTER TABLE `exp_weblogs` CHANGE `enable_trackbacks` `enable_trackbacks` CHAR(1) NOT NULL DEFAULT ‘n’

    There seems to be no viable way to run the Wizard. It either aborts because of a table it already installed, or, if the database is cleared of tables, because there are no tables to update.

    Very frustrating.

  • #10 / Feb 04, 2012 4:37pm

    johnnyb

    45 posts

    Second try (please be sure to read my previous post first):
    1. Completely deleted the database and created a new one.
    2. Restored a backup copy.
    3. Ran the Wizard again.
    4. Got this new error:

    MySQL ERROR:
    Error Number: 1054
    Description: Unknown column ‘can_send_bulletins’ in ‘exp_member_groups’
    Query: ALTER TABLE `exp_member_groups` ADD `include_in_authorlist` CHAR(1) NOT NULL DEFAULT ‘n’ AFTER `can_send_bulletins`

    In an attempt to avoid ambiguity, I’ve created and attached “EE Update Catch-22.xls,” which lists the steps of my three attempts to make the Update work - Method A, Method B, and Method C, with the original database, backup, and restoration named as DB1, DB2, and DB3 to avoid the ambiguity of the term “the database.”  Steps 1-4 are the same in each, representing the preparatory steps, running the Wizard, and its initial failure. Steps 5-8 differ, representing various advice in A and B and the documentation itself in C, with the relevant quotes next to each step.)

    None of these approaches have yet worked. This attempt at update has taken well over a week, and 95% of the time I’ve spent on it has been trying to get clear, unambiguous instructions that actually work when followed.  I’ve documented extensively and accurately every step I’ve taken and the difficulties I’m having. I don’t know what else I can do. 

     

  • #11 / Feb 06, 2012 6:52pm

    Shane Eckert

    7174 posts

    Hello johnnyb,

    I have really enjoyed working with you on your update. I appreciate your curiosity and your tenacity! I believe the best next step is to get you paired with a consultant or a firm that specializes in MySQL, PHP and ExpressionEngine. Working closely with a consultant or firm has so many benefits, they will have full access to your server, they will help you to get upgraded and back online, and the whole experience can be one where you learn a lot more about your ExpressionEngine website.

    We offer a great directory of Professionals that work with MySQL, PHP and ExpressionEngine. It’s our Professional Network and through this listing you can find approved consultants and firms that are qualified and waiting to help you. You may even find that they offer beneficial services you may not have thought of!

    Again, I appreciate your time and effort and I have enjoyed getting to know you.

    If you have any questions about the Professional Network, I would be pleased to answer those questions for you.

    Let us know how the update goes, cannot wait to see the site!

    Cheers,

  • #12 / Feb 07, 2012 10:21am

    johnnyb

    45 posts

    Really, Shane?  You’ve enjoyed this?  Wish I could say the same. But for me it’s been pretty much the same straight-out-of-Dilbert experience as most EE Forum “support.” There have been a few exceptions, but mostly it’s been hours spent painstakingly detailing the entire problem in writing, where a phone call or Skype (dream on) would be more efficient by orders of magnitude. Replies that ignore up to 80% of what has been detailed in the original and subsequent support requests, not to mention what has already been answered in the thread. Superficial “solutions” that don’t work, or excuses for the product. Complete unwillingness and failure to acknowledge any existing problems within any part of EE, its documentation, or support. And the inevitable final referral to expensive outside consultants.

    Perhaps this is all the expected daily fare of some high-spending corporate milieu for which EE is intended, but I’m just a low-budget working guy trying to save my low-budget, almost non-profit client time and money. And EE has been far, far, more trouble than it’s worth. In the time I’ve spent just trying to get anything like actual competent support from EE, I could have re-coded my client’s entire site from scratch.  The whole experience seems like nothing more than a scam: product riddled with glitches + superficial, arcane documentation + unendurable “support” system (“steep learning curve”) = clients driven in despair (and inevitably guided, finally, by “support”) to EE consultants who will admit that there are problems with EE and actually address them. Which is no doubt where the real money in the EE Empire is. I suppose it’s a pretty good business plan - that “steep learning curve” ensures both that no one can really understand EE without becoming a professional EE consultant, and that no one can use it without relying on those consultants. 

    That no doubt works in Dilbertland, but it’s not for me or my clients. I expect a product to work “out of the box,” and I expect support to include clear explanations of how the product works, a willingness to recognize and address product problems, and attention to making the support experience client-friendly.  EE has failed me and my client miserably on all three counts. This attempt to get the Update Wizard to work, and the ridiculous runaround I’ve encountered, has been the last straw.

     

  • #13 / Feb 07, 2012 1:58pm

    Shane Eckert

    7174 posts

    Hello johnnieb,

    I hear your frustration and I understand where you are coming from. I have enjoyed getting to know you and to see your tenacious spirit. I do want to provide you with great support. I didn’t mean to imply that I was giving you the run-around and somehow enjoying that!

    I want to make sure you have a solution here. We can provide excellent guidance through the forums, but ultimately if you’re not comfortable with the changes that need to be made, you would need hands-on assistance. In this case, I was not able to effectively tell you how to do what needed to be done to the point where you felt comfortable doing it. Sometimes the best solution is to have help from an expert who is familiar and comfortable with the technologies in question.

    As we moved through the process of support, you mentioned a few things that led me to believe that you were not comfortable with the steps involved in running an update that failed. For example “I don’t know how to import a backed-up EE database” and “1. I went into my database (eedev) and Dropped all the tables. 2. Ran the Wizard.” (In other words, ran the wizard on an empty DB.) Based on these comments and your general apprehension, I could tell that you were not confident with some of the steps, and that is okay. I do know what the issue is here, but as I mentioned, forum level support is not setup for logging in and personally updating your site for you. And I believe that is where we are; you need someone working on your DB that knows what they are doing and can get your site fixed.

    Please also know that I do not expect you to have a deep pockets. ExpressionEngine began as a product built by and for average Joe’s that do not necessarily have huge sources of funding. As a general rule, I do not suggest using a consultant lightly at all. I do want to give you options though, so that you receive the kind of support you need as you move on past the level of support that we’re able to deliver in the forums.

    There is one more option I should mention. I can put you in touch with Marcus, our Director of Sales and Evangelism, and he can talk to you about Enterprise level support, a level of service that includes the kind of support you’re looking for. If you are interested in that, please let me know and I can get you in touch with Marcus.

    I am very sorry that I was not able to help you resolve your update issue. I want you to have an awesome experience with ExpressionEngine. I wanted to provide you with options so that you could make a decision for how you wanted to receive the kind of help you were looking for. I want to see you succeed, and I’ll be thrilled for you when the update is complete.

    If there is anything else I can do to help, please let me know.

    Regards,

  • #14 / Feb 07, 2012 2:22pm

    johnnyb

    45 posts

    Shane, thanks for replying so quickly and politely. Probably more than I deserve for letting my frustration hang out so unreservedly.  A lot of the problem is indeed my newness to SQL. But the EE instructions on how to update are clearly missing steps, and no one has even acknowledged that.  I am decidedly not an EE or SQL expert, but I’m a fairly fast learner, and I don’t need or want hands-on help, just clear answers to valid questions.  I would be more than willing to give up my more or less paranoid vision of an EE Consulting Empire working off a badly supported and glitchy product, if it weren’t such an ordeal getting those questions answered.  That’s what this forum should be about, answering questions, isn’t it? 

    I invite you to go over the thread from the beginning, count the questions I asked, and see how long it took to get each one answered, how many times I had to repeat questions, and how many of them weren’t ever addressed at all, let alone answered competently - including the last one, to wit:

    I’ve followed the instructions in “Updating to a New Version” exactly and tried everything else suggested in this thread. I’ve run the prep steps, deleted the database, created a completely new, empty one, and restored (Imported) the old tables before running the Wizard, and when I run the Wizard, it still fails, returning a completely new error:

    Error: The following error was encountered
    MySQL ERROR:
    Error Number: 1054
    Description: Unknown column ‘can_send_bulletins’ in ‘exp_member_groups’
    Query: ALTER TABLE `exp_member_groups` ADD `include_in_authorlist` CHAR(1) NOT NULL DEFAULT ‘n’ AFTER `can_send_bulletins`

    Why is this happening?  How do I fix it? The only reference to “columns” in Troubleshooting Upgrade Errors - including the Version Notes from 1.6 onwards - is (emphasis added)

    2) Third-Party Modifications. Either an in-house developer or a third-party add-on added the offending elements to your database. Those offending tables, columns, or keys will need to be manually removed from your database before trying your upgrade again.

      But the error message seems to indicate that the query is attempting to ADD “include_in_authorlist” AFTER “can_send_bulletins” - which would indicate that it expects that column to be there.  On the other hand, it also seems to regard the presence of “can_send_bulletins” as an error. That doesn’t make sense to me. I’m perfectly willing to go into the table, delete the offending column, and run the Wizard again - but it looks pretty much as if it would just fail again with a new error message that “can_send_bulletins” doesn’t exist. 

    I don’t see any reason why some EE expert, right here in this Forum, shouldn’t be able to clarify for me exactly what’s going on, and make a sensible and relevant recommendation, rather than leave me to rely on blind trial and error. Sure, it’s a lot easier to fob this problem off on some consultant than face it and address it. But trying to justify that by generalizing that I’m supposedly “uncomfortable” with understanding and running the update process is pretty lame. I just want the process to work as described and get any problems with it explained, and as you have acknowledged, I’ve been hanging in there doggedly with that expectation for almost two weeks.  But if this is the way EE is going to “support” the Update Wizard, it would be more honest to say, right out front, “The Update Wizard doesn’t really work, and we’re not really comfortable 😉with supporting it. So good luck updating from an earlier version - you’re probably going to have to pay an outside consultant to help you do that successfully.”

    PS. Feb. 8: There’s no no column named “can_send_bulletins” in the table exp_member_groups.  So why is the error message saying that column is “Unknown” instead of “Missing?”  Doesn’t “Unknown” indicate that the the Wizard is finding the column, and not recognizing it?  Damn straight I’m “uncomfortable” with the Wizard’s error message - it’s screwed up. It’s saying that there’s a problem with an unknown column, when in fact the column doesn’t exist. It’s trying to ADD a column after that missing column. Which means that Wizard is expecting that column to be there, so it can’t be an “offending” column “added by a third party or add on.” So please, answer this simple question: Where exactly in this table should I add this missing column, and what should be its type, null, key, default, and extra settings?

    PPS. Dollars to donuts it was the Wizard itself that removed this column when updating to an earlier version.

    PPPS. Tying to run the EE Control Panel on the site now returns an SQL error that the table “eedev.exp_sites” “doesn’t exist.”  This is the same table that the Wizard complained “already exists” when I first ran it. Could be because of the aborted update, but given the context, disturbing.

    Update 11:45 pm Feb 8: Apparently “unknown column” is standard SQL Errorspeak for “missing column.”  I went into exp_member_groups and added the “unknown” column (Googled it to find proper placing) and the Wizard proceeded.  However, it promptly gave me another 1054 error for another “unknown” column in exp_member_groups, and when I fixed that, another one of the same in exp_weblogs.  This is getting really tedious.  How about some standard description of the basic EE database structure - a list of tables and columns - for each version? If I had that, I could at least check and update the database tables in the backup before restoring the database prior to running the Wizard at each level.  I’m at version 6 now, running the upgrade for 6.1,

    Very, very tedious.  I don’t really expect EE to fix the Wizard or its documentation before April) but there’s nothing even in the Version Notes for 1.6 about these repeated 1054 errors for “unknown” columns that are apparently standard EE structure.

  • #15 / Feb 12, 2012 8:48pm

    Dan Decker

    7338 posts

    Hi johnnyb,

    I am sorry for the frustrations you have experienced over this.

    We do acknowledge that the update wizard is flawed. It needs to perform more robust integrity checking, and handle errors more gracefully.

    The process you have outlined in your last post, in “PPPS” is exactly the process for working though a problematic update.

    As for an ExpressionEngine database schema map, I would love to have one as well. Right now, the way to know what changes are being made at what version is to read the corresponding update file and examine the PHP.

    Can you update us on where you are with your iterative process? Have you continued to have success with your essentially manual process?

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases