Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Vanilla 2 Upgrading Tips

TimTim Lord of Servers Vanilla Staff
edited January 2011 in Questions
Upgrading software can often be frustrating and there are always ways to make things go more smoothly. I'm going to be compiling a list of tips and tricks for completing Vanilla upgrades (as discovered by you guys, our community) in this thread.

Start posting your ideas :)

Before you make any changes...


  1. Back up your database

  2. Back up your conf/config.php

The upgrade process


  1. If you can, instead of simply copying the new files over the old files, delete your original files first (everything except conf/, cache/, uploads/, custom themes/and custom plugins/ and *then* copy the news files. This will ensure that any files we've removed from Vanilla in the updated version will not stick around in your installation.

If you've just upgraded Vanilla 2...


  1. Delete all the .ini files in your cache/ folder

  2. Run the /utility/update database update script

/utility/update

Running /utility/updateis pretty simple, but we often find people getting extremely confused. I'm going to explain how Vanilla URLs work here. Please read carefully.

If you're reading this, your browser's address bar has the following in it:
http://www.vanillaforums.org/discussion/12740/vanilla-2-upgrading-tips

Lets break that URL into its constituent parts

The Scheme:
http://
It should be pretty obvious what this is.

The Domain:
www.vanillaforums.org
This is the domain on which your forum is installed.

The Webroot:
http://www.vanillaforums.org/
This is the hardest one to understand. On vanillaforums.org, we've installed the forum at the topmost level of the web server's document root, so there are no additional folders in the URL. Lets say, however, that we installed Vanilla into a subfolder on our web server, and lets say we called that folder "myforum/". Now the web root would be: http://www.vanillaforums.org/myforum/. Basically, when in doubt, the web root is the shortest URL that gets you to the discussions list.

The Path:
discussion/12740/vanilla-2-upgrading-tips
This is the "request" that Vanilla is processing for you. In this case, if we converted the path to pseudo English, it would sound something like: "give me the discussion with id number 12740". The title part is optional, and is only there to make links look nicer and to improve user experience and search engine optimization.

Now, back to our instructions for accessing "/utility/update"

"Navigate to the page in your forum that updates your database (this will not work if you did not sign in as UserID = 1): www.yourdomain.com/path/to/vanilla/utility/update"

"Navigate to the page in your forum" - This tells us to start with the Webroot. Cool, so right now our URL looks like this:
http://www.vanillaforums.org/

"that updates your database" - This is filler text, ignore it. It simply describes the page you are about to visit. URL still looks the same as before:
http://www.vanillaforums.org/

"(this will not work if you did not sign in as UserID = 1)" - This tells us to be logged in as the ORIGINAL CREATOR ACCOUNT of the forum. This is the user your created DURING THE INSTALL PROCESS. URL still looks the same, but we should now be logged in as the primary admin.
http://www.vanillaforums.org/

"www.yourdomain.com/path/to/vanilla/" - This is a common way of specifying URLs whose beginning is unknown to the writer. When we write "/path/to" it is a way of saying "the fully qualified path to ". This is basically a reiteration of the first part, where we say "Navigate to the page in your forum". URL stays the same.
http://www.vanillaforums.org/

"utility/update" - And now we just tack this on the end of our URL:
http://www.vanillaforums.org/utility/update

And that's it! If you did everything correctly, you should get a page that says "Success"!

Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

Tagged:
«13

Comments

  • edited August 2010
    I assume you also don't want to delete themes/ when you upgrade. Anyone with a custom theme would be in trouble if they deleted that folder!
  • What about utility/structure?
  • TimTim Lord of Servers Vanilla Staff
    What about utility/structure?
    Good idea, thanks.

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • When I click "Run structure & data scripts" I get "The structure was successfully executed." and everything looks ok.

    When I click "rescan" it brings up all the same stuff from "The following structure changes are required for your database." over and over again everytime I run it and rescan it so it looks like it isn't making any changes.
  • TimTim Lord of Servers Vanilla Staff
    There are a couple of things in there right now which will always come up. We're working on new rules that don't do that.

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • When I click "Run structure & data scripts" I get "The structure was successfully executed." and everything looks ok.

    When I click "rescan" it brings up all the same stuff from "The following structure changes are required for your database." over and over again everytime I run it and rescan it so it looks like it isn't making any changes.
    @Tim So are we right to assume the script was successful
  • TimTim Lord of Servers Vanilla Staff
    yup

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • Any idea what I'm doing wrong? I followed all your instructions, but when I try to open utility/structure it gives me this error

    Parse error: syntax error, unexpected ',', expecting '(' in /nfs/c06/h04/mnt/95421/domains/talkvancouver.ca/html/bootstrap.php on line 64
  • RaizeRaize
    edited September 2010
    deactivating all plugins didn't help.. this sucks, my forum was off to such a good start :(
  • TimTim Lord of Servers Vanilla Staff
    Running PHP4 by accident?

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • Yes that was it! I came here to break the news but you beat me to it lol. All is well once again.

    Thanks for the response Tim, I wasn't expecting anyone to be around at this time :)

    The weird thing is that the setting changed from PHP5 to PHP4 on it's own somehow (after I uploaded the new files to the server).
  • LincolnLincoln Community Instigator Vanilla Staff
    Added to the upgrade documentation and unannouncing.

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • edited January 2011
    After deleting and uploading the directories described above, I'm stuck with a 500 error when I try to go to /utility/structure and a BONK when I try to go to my homepage. This is so depressing...

    (I'm trying to upgrade from 2.0.14 to 2.0.17)
  • TimTim Lord of Servers Vanilla Staff
    edited January 2011
    Add/change this to/in your config:
    $Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php';
    Then go to the homepage and tell me what the error is.

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • @Tim: Thanks for the quick response. Here's what I get:

    Fatal Error in Gdn_Database.Query();
    Unknown column 'c.TreeRight' in 'field list'

    Need more details?
  • TimTim Lord of Servers Vanilla Staff
    Try visit /utility/update
    on your forum

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • This again: Error 500 - Internal server error

    Is it file permissions or something?
  • Hello. Is anybody else discussing this issue (one similar to mine) on a more appropriate page?
  • TimTim Lord of Servers Vanilla Staff
    Internal Server Error is just a polite phrase that means "Check your webserver error log, something bad happened"

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • Right. I understand the 500 error, but what about the database error feedback that Vanilla gave me? I would like to know if this is a bug that needs to be fixed or if I have done something wrong. Here's more complete:

    Fatal Error in Gdn_Database.Query();
    Unknown column 'c.TreeRight' in 'field list'
    select c.Name as `Name`, c.CategoryID as `CategoryID`, c.TreeRight as `TreeRight`, c.TreeLeft as `TreeLeft`, c.Depth as `Depth`, c.Description as `Description`, c.CountDiscussions as `CountDiscussions`, c.CountComments as `CountComments`, c.UrlCode as `UrlCode`, c.LastCommentID as `LastCommentID`, co.DateInserted as `DateLastComment`, co.InsertUserID as `LastCommentUserID`, cu.Name as `LastCommentName`, cu.Photo as `LastCommentPhoto`, co.DiscussionID as `LastDiscussionID`, d.Name as `LastDiscussionName` from GDN_Category c left join GDN_Comment co on c.LastCommentID = co.CommentID left join GDN_User cu on co.InsertUserID = cu.UserID left join GDN_Discussion d on d.DiscussionID = co.DiscussionID where c.AllowDiscussions = :cAllowDiscussions order by TreeLeft asc
  • forgot to login with the #1 account before upgrading is there anyway I can change the login so I can run utility.structure?
  • LincolnLincoln Community Instigator Vanilla Staff
    Just hit /utility/upgrade once and everything will work.

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • Awesome thanks @lincoln that worked. Only remaining problem I have is getting permission problem messages saying "you dont have permission to do that" when clicking on activity or anyones user profile link.
  • judgejjudgej
    edited January 2011

    Unknown column 'c.TreeRight' in 'field list'
    That's nothing to do with the ReplyTo plugin, is it?

    Edit: ah, no, it looks like categories have gone truly hierarchical?


  • That's nothing to do with the ReplyTo plugin, is it?
    Edit: ah, no, it looks like categories have gone truly hierarchical?
    What's weird is that I can switch back to my backup files from the earlier version of Vanilla and the site works fine (obviously, the database hasn't been touched yet). I DO have some plugins. Should I disable plugins and proceed? Any idea what I've stumbled into here?
  • judgejjudgej
    edited January 2011
    It looks like the new Vanilla (v2.0.17) needs to create additional columns on the categories table in order to be able to handle fully hierarchical categories. Until those columns are created (using /utility/upgrade presumably) then you will get the errors that you are seeing.

    I would go ahead and run the upgrade - perhaps leaving the plugins all enabled. However, do back up the database first, in case you need to repeat the upgrade with the plugins disabled.
  • LincolnLincoln Community Instigator Vanilla Staff
    @dejitaru There is a new permission for that. Adjust your Roles & Permissions.

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • LincolnLincoln Community Instigator Vanilla Staff
    @Simanek That's the SQL error you'll get until you've run /utility/upgrade

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • @Lincoln and @judgej: Thanks for the feedback guys. What you say makes sense, but when I try to go to /utility/upgrade I get a 500 error. Is there another way to get to the upgrade page? Do I need to tweak my htaccess file or something?
  • Update: So I finally went back to just the root of my site to see what error would come up after several days of just leaving the site be. To my surprise the login page came up. I logged in and the site seems to be working fine. The footer in the Dashboard page indicates that I'm running 2.0.17. I DID have to change my .htaccess file so the "RewriteBase /" was uncommented. Now 500 errors are gone, the site is working. However, I never saw the "upgrade" page or any feedback about that change so I'm a little nervous. If I try to go to "/utility/upgrade" now all I get is the Vanilla Page Not Found page. Did the db upgrade happen? I can only guess that the rewrite line was my problem.
«13
This discussion has been closed.