Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Upgrading to 2.1.6 from 2.0.18

edited November 2014 in Vanilla 2.0 - 2.8

This is been an hours long process thus far, mostly because GDN_Activity is 2.6GB on my forum.

So after watching the mysql process list go through that and getting passed gateway timeout issues on upgrade, index.php?p=/utility/update now only shows:
"Failure

The update was not successful.

Debug Trace

Info Need to re-index theme cache
Info Need to re-index plugin cache"

With no other information despite having debug mode on.

index.php?p=/utility/structure/ shows:
/* 'unique index UX_Tag (Name)' => 'unique index UX_Tag (Name, CategoryID)' */
alter table GDN_Tag
drop index UX_Tag;
alter table GDN_Tag
add unique index UX_Tag (Name, CategoryID);

but if I try to run that I get:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'alter table `GDN_Tag`
add unique index UX_Tag (`Name`, `CategoryID`)' at line 4
## *edit*/library/database/class.database.php(302): Gdn_Database->Query(...)
#0 [internal function]: Gdn_ErrorHandler(256, 'You have an err...', '...', 302, Array)
#1 *edit*/library/database/class.database.php(302): trigger_error('You have an err...', 256)
#2 *edit*/library/database/class.databasestructure.php(330): Gdn_Database->Query('/* 'unique inde...')
#3 /*edit*/library/database/class.mysqlstructure.php(522): Gdn_DatabaseStructure->Query('/* 'unique inde...')
#4 *edit*/library/database/class.databasestructure.php(392): Gdn_MySQLStructure->_Modify(false, false)
#5 *edit*/applications/dashboard/settings/structure.php(597): Gdn_DatabaseStructure->Set(false, false)
#6 *edit*/applications/dashboard/controllers/class.utilitycontroller.php(310): include('/srv/www/lafixe...')
#7 [internal function]: UtilityController->Structure('all', '0', '0', '0')
#8 *edit*/library/core/class.dispatcher.php(350): call_user_func_array(Array, Array)
#9 *edit*/index.php(46): Gdn_Dispatcher->Dispatch()
#10 {main}

Wow forum ruins formatting but not sure how to prevent that.

I should note that I've already cleared out the caches, disabled all plugins, and set the theme to default.

So I ended up manually deleting the index UX_TAG and then the update and structure ran cleanly. Now if only you guys would update the vanilla classic theme to work properly with this release :)

Bleistivt

Comments

  • BleistivtBleistivt Moderator
    edited November 2014

    http://vanillaforums.org/addon/activitypurge-plugin
    A huge activity table will slow down your forum over time and most of the contents are unnecessary after a few days anyway.

    Last time I checked the Vanilla Classic theme was looking ok with minor glitches on 2.1.

  • @Bleistivt said:
    http://vanillaforums.org/addon/activitypurge-plugin
    A huge activity table will slow down your forum over time and most of the contents are unnecessary after a few days anyway.

    Last time I checked the Vanilla Classic theme was looking ok with minor glitches on 2.1.

    Yea I ended up trimming it down myself, which also took a long time, its down to 250M now.

    For Classic, it's pretty wonky, I guess the new post thread class changed and that's a change I manually fixed but there's still random checkboxes that look way out of place and a lot of small things that make it look really out of wack.

  • I recommend putting a purge command in crontab, but bare in mind that wall comment are in the activity table so you need to exclude them.

    2.1 indexes activity better but still work purging it, you don't really records older than a month or two.

    grep is your friend.

  • After a lot of searching and trying lots of things, deleting the index UX_TAG seams to do the trick. I finally got a successful update message. However I have no experience in editing a DB. So I have no idea what it means to delete this. Can anyone say anything about that?
    I'm not sure I will be able to get it back in again. Deleting is easy it seams. I did do a backup, but who knows how that will turn out in the end if I need to import only some of it again.

    Weird that this is not in the update instructions.

    Thanks for a great forum though :)

    Bleistivtperegrine
  • LincLinc Detroit Admin
    edited November 2014

    @ibox That was a safe thing to do; no further action is needed, it will re-create any necessary indexes. Good sleuthing! @peregrine has filed an issue to get this fixed. I've filed a ticket to improve the upgrade notes: https://github.com/vanilla/vanilla/issues/2292

  • I ran into the same problem so I ran the following in phpmyadmin and then reran structure and update and it worked fine.

    alter table 'GDN_Tag' drop index UX_Tag; alter table 'GDN_Tag' add unique index UX_Tag ('Name', 'CategoryID');

    Linc
  • @[-Stash-] ? Now that is going back. ;)

    grep is your friend.

  • AnonymooseAnonymoose ✭✭
    edited November 2014

    Some of the database structure changes listed by dashboard/utility/structure gave MySQL errors after pressing Run structure & data scripts.

    So... manually executed them one by one in sql, skipping the commented lines.

    Works now.

  • If you installed vanilla via softaculous . Just press upgrade and yes do not forget to back up your database in case things go wrong. Lovely Vanilla.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @ValentineMasina said:
    If you installed vanilla via softaculous . Just press upgrade and yes do not forget to back up your database in case things go wrong. Lovely Vanilla.

    As long as they offer the correct version upgrade. Third party Installation scripts are not always error proof.

    peregrine
Sign In or Register to comment.