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.

upgrade issue from vanilla 2.1.6 to 2.2.1

Hello,

I 've upgraded vanilla forum in local with no issues. I 've overwrited the file and the run yourforum.com/index.php?p=/utility/update.
Same procedure with the remote site, but after running yourforum.com/index.php?p=/utility/update i get the following message:

Fatal Error in PHP.trigger_error();

Unknown column 'w.Participated' in 'field list'
The error occurred on or near: /htdocs/public/www/vanilla/library/database/class.database.php
408: // If we get here then the pdo statement prepared properly.
409: break;
410:
411: } catch (Gdn_UserException $uex) {
412: trigger_error($uex->getMessage(), E_USER_ERROR);
413: } catch (Exception $ex) {
414: list($state, $code, $message) = $PDO->errorInfo();
415:
416: // If the error code is consistent with a disconnect, attempt to retry
Backtrace:
/htdocs/public/www/vanilla/library/database/class.database.phpPHP::Gdn_ErrorHandler();
[/htdocs/public/www/vanilla/library/database/class.database.php:412] PHP::trigger_error();
[/htdocs/public/www/vanilla/library/database/class.sqldriver.php:1663] Gdn_Database->query();
[/htdocs/public/www/vanilla/library/database/class.sqldriver.php:614] Gdn_SQLDriver->query();
[/htdocs/public/www/vanilla/applications/vanilla/models/class.discussionmodel.php:420] Gdn_SQLDriver->get();
[/htdocs/public/www/vanilla/applications/vanilla/controllers/class.discussionscontroller.php:144] DiscussionModel->getWhere();
[/htdocs/public/www/vanilla/applications/vanilla/controllers/class.discussionscontroller.php:144] DiscussionsController->index();
[/htdocs/public/www/vanilla/library/core/class.dispatcher.php:329] PHP::call_user_func_array();
[/htdocs/public/www/vanilla/index.php:44] Gdn_Dispatcher->dispatch();
Variables in local scope:
[Sql] 'select d2.*, w.UserID as WatchUserID, w.DateLastViewed as DateLastViewed, w.Dismissed as Dismissed, w.Bookmarked as Bookmarked, w.CountComments as CountCommentWatch, w.Participated as Participated
from GDN_Discussion d
join GDN_Discussion d2 on d.DiscussionID = d2.DiscussionID
left join GDN_UserDiscussion w on w.DiscussionID = d2.DiscussionID and w.UserID = 1
order by d.DateLastComment desc
limit 30'
[InputParameters] array (
)
[Options] array (
'Type' => 'select',
'Slave' => NULL,
'ReturnType' => 'DataSet',
)
[ReturnType] 'DataSet'
[tries] 2
[try] 0
[PDO] array (
)
[PDOStatement] false
[state] '42S22'
[code] 1054
[message] 'Unknown column \'w.Participated\' in \'field list\''
[uex] array (
)

Any idea ho to solve this?

thank you

Comments

  • could it be a permissions limitation database on the remote site?

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    Are you importing data from your test install to your 'live' one?

    If so, at a guess, you have a plugin enabled in your test install, which has created the column 'Participated' in the discussion table, but which you don't have in your 'live' db.

    'Particpated' isn't a native column in the GDN_Discussion table, nor is WatchUserId

  • hi whu606, no I simply overwrite the 2.2.1 files in the remote directory and run run yourforum.com/index.php?p=/utility/update, following these tips

  • I think that 2.2.1 database has some tables more, and the update utility can' t create a table due to permissions question. I 've to ask to my hosting service.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    There is also

    utility/structure/all

    to upgrade the DB structure.

  • ok, I want try again to upgrade, but before I want to be sure that I can easily come back. It's enough export the sql database and save all the vanilla files directory, right?

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @Mark1215

    The database is the key aspect. I'd export it, and also make an onsite copy.

    Other than that, to be absolutely safe, you just need to backup the uploads folder, and possibly a copy of the conf/conf.php file, and any custom theme you have created/edited.

    You don't need to copy the entire Vanilla folder.

    If your upgrade fails, you can simply reinstall the relevant Vanilla version.

  • @Mark1215

    you could check this out.

    https://vanillaforums.org/discussion/31153/tutorial-a-fool-proof-way-to-do-a-vanilla-upgrade-from-2-1-to-2-2#latest

    https://vanillaforums.org/discussion/21192/which-files-should-i-back-up

    @whu606 said:
    Are you importing data from your test install to your 'live' one?

    If so, at a guess, you have a plugin enabled in your test install, which has created the column 'Participated' in the discussion table, but which you don't have in your 'live' db.

    'Particpated' isn't a native column in the GDN_Discussion table, nor is WatchUserId

    because it is not in the Discussion table. they are both in the UserDiscussions table :)

    either the sql statement is broken under your conditions, or the UserDiscussion Table columns referring to that column are missing due to user error when fiddling with tables.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

Sign In or Register to comment.