HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Upgrading Problems From Version 2.1

This discussion was created from comments split from: Vanilla 3.3 is now available.

Comments

  • TheSageTheSage New
    edited January 2020

    @whu606 @R_J

    I am trying again today to upgrade from 2.1 to 2.8 (on my way to 3.3).

    Completed Actions:

    -Uploaded 2.8 package

    -Removed all files/folder listed in this upgrade document

    -Updated my PHP to 7.3

    -Tried to run example.com/utility/update FAILED: [an error occurred while processing this directive]

    -Ran the Debug (True) in Config

    I get this error, I can't find this 'w.Participated' anywhere in the database, what's my next move?:

    Unknown column 'w.Participated' in 'field list'

    The error occurred on or near: /home4/busgreas/public_html/forum/library/database/class.database.php

    417:                 if (!$message) {
    418:                     $message = $ex->getMessage();
    419:                 }
    420: 
    421:                 trigger_error($message, E_USER_ERROR);
    422:             }
    423: 
    424:         }
    425: 
    

    Backtrace:

    /home4/busgreas/public_html/forum/library/database/class.database.phpPHP::gdn_ErrorHandler();
    [/home4/busgreas/public_html/forum/library/database/class.database.php:421] PHP::trigger_error();
    [/home4/busgreas/public_html/forum/library/database/class.sqldriver.php:1707] Gdn_Database->query();
    [/home4/busgreas/public_html/forum/library/database/class.sqldriver.php:664] Gdn_SQLDriver->query();
    [/home4/busgreas/public_html/forum/applications/vanilla/models/class.discussionmodel.php:1239] Gdn_SQLDriver->get();
    [/home4/busgreas/public_html/forum/applications/vanilla/controllers/class.discussionscontroller.php:188] DiscussionModel->getAnnouncements();
    [/home4/busgreas/public_html/forum/library/core/class.dispatcher.php:862] DiscussionsController->index();
    [/home4/busgreas/public_html/forum/library/core/class.dispatcher.php:279] Gdn_Dispatcher->dispatchController();
    [/home4/busgreas/public_html/forum/index.php:29] Gdn_Dispatcher->dispatch();
    

    Variables in local scope:

    [sql] 'select d.*, d.InsertUserID as `FirstUserID`, d.DateInserted as `FirstDate`, d.DateLastComment as `LastDate`, d.LastCommentUserID as `LastUserID`, 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`
    left join `GDN_UserDiscussion` `w` on d.DiscussionID = w.DiscussionID and w.UserID = 13149
    where `d`.`CategoryID` in (\'-1\', \'1\')
     and `d`.`DiscussionID` in (\'573\')
     and `d`.`Announce` = :dAnnounce
     and coalesce(w.Dismissed, \'0\') = :coalescewDismissed0
    order by `d`.`DateLastComment` desc'
    [inputParameters] array (
      ':dAnnounce' => 1,
      ':coalescewDismissed0' => '0',
    )
    [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\''
    [ex] array (
    )
    


  • Sorry, but it looks to me like a waste of time to debug X upgrade processes instead of one...

    But in the table GDN_UserDiscussion is a column called "Participated". If it is currently not there, you can create it with this command:

    ALTER TABLE `GDN_UserDiscussion`
    ADD `Participated` tinyint(4) NOT NULL;
    

    Try to run /utility/structure first. Maybe that will already fix the problem.

  • TheSageTheSage New
    edited January 2020


  • TheSageTheSage New
    edited January 2020

    @R_J @whu606

    I have never had the /utility/structure function. [an error occurred while processing this directive]

    I am continuing to work through errors... What does this mean?

    As I have stated before, thank you very much for your help! I am not a developer, but a guy who likes old buses and is handy with Cpanel, Wordpress and PHPBB so I was asked to help get our forum working.

    Fatal Error in Garden\Container\Container.makeDefaultArgs();

    Could not find required constructor param themesapi in the autoloader.

    The error occurred on or near: /home4/busgreas/public_html/forum/vendor/vanilla/garden-container/src/Container.php

    609:             } catch (\ReflectionException $e) {
    610:                 // If the class is not found in the autoloader a reflection exception is thrown.
    611:                 // Unless the parameter is optional we will want to rethrow.
    612:                 if (!$param->isOptional()) {
    613:                     throw new NotFoundException(
    614:                         "Could not find required constructor param $name in the autoloader.",
    615:                         500,
    616:                         $e
    617:                     );
    

    Backtrace:

    [/home4/busgreas/public_html/forum/vendor/vanilla/garden-container/src/Container.php:454] Garden\Container\Container->makeDefaultArgs();
    [/home4/busgreas/public_html/forum/vendor/vanilla/garden-container/src/Container.php:708] Garden\Container\Container->makeFactory();
    [/home4/busgreas/public_html/forum/vendor/vanilla/garden-container/src/Container.php:356] Garden\Container\Container->createInstance();
    [/home4/busgreas/public_html/forum/vendor/vanilla/garden-container/src/Container.php:791] Garden\Container\Container->getArgs();
    [/home4/busgreas/public_html/forum/library/core/class.controller.php:2063] Garden\Container\Container->get();
    [/home4/busgreas/public_html/forum/library/core/class.controller.php:1960] Gdn_Controller->addThemeAssets();
    [/home4/busgreas/public_html/forum/library/core/class.controller.php:1471] Gdn_Controller->renderMaster();
    [/home4/busgreas/public_html/forum/library/core/class.pluggable.php:217] Gdn_Controller->xRender();
    [/home4/busgreas/public_html/forum/applications/vanilla/controllers/class.discussionscontroller.php:228] Gdn_Pluggable->__call();
    [/home4/busgreas/public_html/forum/library/core/class.dispatcher.php:872] DiscussionsController->index();
    [/home4/busgreas/public_html/forum/library/core/class.dispatcher.php:289] Gdn_Dispatcher->dispatchController();
    [/home4/busgreas/public_html/forum/index.php:29] Gdn_Dispatcher->dispatch();
    

    Need Help?

    If you are a user of this website, you can report this message to a website administrator.

    If you are an administrator of this website, you can get help at the Vanilla Community Forums.

    Additional information for support personnel:

    • Application: Vanilla
    • Application Version: 2.8.4
    • PHP Version: 7.3.13
    • Operating System: Linux
    • Server Software: Apache
    • User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
    • Request Uri: /forum/
    • Controller: Garden\Container\Container
    • Method: makeDefaultArgs


  • "I have never had the /utility/structure function. [an error occurred while processing this directive]"

    Which error?

  • @R_J

    This is the error (below) is get consistently when I run /utility/structure

    [an error occurred while processing this directive]

    How can this error below be addressed?

    Fatal Error in Garden\Container\Container.makeDefaultArgs();

    Could not find required constructor param themesapi in the autoloader.

    The error occurred on or near: /home4/busgreas/public_html/forum/vendor/vanilla/garden-container/src/Container.php

    609:             } catch (\ReflectionException $e) {
    610:                 // If the class is not found in the autoloader a reflection exception is thrown.
    611:                 // Unless the parameter is optional we will want to rethrow.
    612:                 if (!$param->isOptional()) {
    613:                     throw new NotFoundException(
    614:                         "Could not find required constructor param $name in the autoloader.",
    615:                         500,
    616:                         $e
    617:                     );
    

    Backtrace:

    [/home4/busgreas/public_html/forum/vendor/vanilla/garden-container/src/Container.php:454] Garden\Container\Container->makeDefaultArgs();
    [/home4/busgreas/public_html/forum/vendor/vanilla/garden-container/src/Container.php:708] Garden\Container\Container->makeFactory();
    [/home4/busgreas/public_html/forum/vendor/vanilla/garden-container/src/Container.php:356] Garden\Container\Container->createInstance();
    [/home4/busgreas/public_html/forum/vendor/vanilla/garden-container/src/Container.php:791] Garden\Container\Container->getArgs();
    [/home4/busgreas/public_html/forum/library/core/class.controller.php:2063] Garden\Container\Container->get();
    [/home4/busgreas/public_html/forum/library/core/class.controller.php:1960] Gdn_Controller->addThemeAssets();
    [/home4/busgreas/public_html/forum/library/core/class.controller.php:1471] Gdn_Controller->renderMaster();
    [/home4/busgreas/public_html/forum/library/core/class.pluggable.php:217] Gdn_Controller->xRender();
    [/home4/busgreas/public_html/forum/applications/vanilla/controllers/class.discussionscontroller.php:228] Gdn_Pluggable->__call();
    [/home4/busgreas/public_html/forum/library/core/class.dispatcher.php:872] DiscussionsController->index();
    [/home4/busgreas/public_html/forum/library/core/class.dispatcher.php:289] Gdn_Dispatcher->dispatchController();
    [/home4/busgreas/public_html/forum/index.php:29] Gdn_Dispatcher->dispatch();
    


  • Have you a) downloaded the zip from here (not GitHub) and b) cleaned /cache folder?

  • TheSageTheSage New
    edited January 2020

    @R_J


    Yes to the real build of 3.3, Yes to clearing cache. The site now appears, but most of the discussions are missing (like the DB needs to be updated). I also can't log in nor does password reset work.

    I can't get the utility to execute


  • Could this be an HTACCESS Error? I don't think this file has been updated, and I don't see where it updates when I upload the 3.3 package.

  • No, if you have a htaccess that works with an older version of Vanilla, you should keep that. That's why it is not renewed with new versions.

    I cannot understand that error. Could it be a result of some failed updating tries? Are you still trying to update to a Vanilla version < 3.3? If yes, I cannot support much since my installed version is 3.3

  • TheSageTheSage New
    edited January 2020


    @R_J

    This is going from 2,8 to 3.3. The utility has never worked for me.

    I ran debug again and it came up with this. There is not "DateExpires" column, does this mean it needs to be added?

    Unknown column 'DateExpires' in 'where clause'

    The error occurred on or near: /home4/busgreas/public_html/forum/library/database/class.database.php

    417:                 if (!$message) {
    418:                     $message = $ex->getMessage();
    419:                 }
    420: 
    421:                 trigger_error($message, E_USER_ERROR);
    422:             }
    423: 
    424:         }
    425: 
    

    Backtrace:

    /home4/busgreas/public_html/forum/library/database/class.database.phpPHP::gdn_ErrorHandler();
    [/home4/busgreas/public_html/forum/library/database/class.database.php:421] PHP::trigger_error();
    [/home4/busgreas/public_html/forum/library/database/class.sqldriver.php:1707] Gdn_Database->query();
    [/home4/busgreas/public_html/forum/library/database/class.sqldriver.php:366] Gdn_SQLDriver->query();
    [/home4/busgreas/public_html/forum/library/core/class.model.php:504] Gdn_SQLDriver->delete();
    [/home4/busgreas/public_html/forum/library/Vanilla/PrunableTrait.php:95] Gdn_Model->delete();
    [/home4/busgreas/public_html/forum/applications/dashboard/models/class.sessionmodel.php:26] SessionModel->prune();
    [/home4/busgreas/public_html/forum/library/core/class.session.php:828] SessionModel->insert();
    [/home4/busgreas/public_html/forum/library/core/class.session.php:769] Gdn_Session->getStashSession();
    [/home4/busgreas/public_html/forum/applications/dashboard/controllers/class.entrycontroller.php:1825] Gdn_Session->stash();
    [/home4/busgreas/public_html/forum/library/core/class.dispatcher.php:872] EntryController->passwordReset();
    [/home4/busgreas/public_html/forum/library/core/class.dispatcher.php:289] Gdn_Dispatcher->dispatchController();
    [/home4/busgreas/public_html/forum/index.php:29] Gdn_Dispatcher->dispatch();
    

    Variables in local scope:

    [sql] 'delete  from `GDN_Session`
    where `DateExpires` < :DateExpires
    limit 10'
    [inputParameters] array (
      ':DateExpires' => '2020-01-02 23:11:38',
    )
    [options] array (
      'Type' => 'delete',
      'Slave' => NULL,
      'ReturnType' => '',
    )
    [returnType] ''
    [tries] 2
    [try] 0
    [pDO] array (
    )
    [pDOStatement] false
    [state] '42S22'
    [code] 1054
    [message] 'Unknown column \'DateExpires\' in \'where clause\''
    [ex] array (
    )
    

    Nee


  • The table GDN_Session needs a column DateExpires: `DateExpires` datetime DEFAULT NULL

    But this is going to be tedious is /utility/structure will not work. If you like to, you can send me the credentials of your server and I'll have a look at it.

  • I just tried running Utility/update and got this error


    Fatal Error in PHP.gdn_ErrorHandler();

    Unknown column 'p.Garden.Messages.Manage' in 'field list'

    The error occurred on or near: /home4/busgreas/public_html/forum/library/database/class.database.php

    417:                 if (!$message) {
    418:                     $message = $ex->getMessage();
    419:                 }
    420: 
    421:                 trigger_error($message, E_USER_ERROR);
    422:             }
    423: 
    424:         }
    425: 
    

    Backtrace:

    /home4/busgreas/public_html/forum/library/database/class.database.phpPHP::gdn_ErrorHandler();
    [/home4/busgreas/public_html/forum/library/database/class.database.php:421] PHP::trigger_error();
    [/home4/busgreas/public_html/forum/library/database/class.sqldriver.php:1707] Gdn_Database->query();
    [/home4/busgreas/public_html/forum/library/database/class.sqldriver.php:664] Gdn_SQLDriver->query();
    [/home4/busgreas/public_html/forum/applications/dashboard/models/class.permissionmodel.php:543] Gdn_SQLDriver->get();
    [/home4/busgreas/public_html/forum/applications/dashboard/models/class.usermodel.php:5057] PermissionModel->cachePermissions();
    [/home4/busgreas/public_html/forum/applications/dashboard/models/class.usermodel.php:1817] UserModel->getPermissions();
    [/home4/busgreas/public_html/forum/library/core/class.session.php:443] UserModel->getSession();
    [/home4/busgreas/public_html/forum/applications/dashboard/models/class.updatemodel.php:703] Gdn_Session->start();
    [/home4/busgreas/public_html/forum/applications/dashboard/models/class.updatemodel.php:660] UpdateModel->runStructureInternal();
    [/home4/busgreas/public_html/forum/applications/dashboard/controllers/class.utilitycontroller.php:292] UpdateModel->runStructure();
    [/home4/busgreas/public_html/forum/applications/dashboard/controllers/class.utilitycontroller.php:330] UtilityController->legacyUpdate();
    [/home4/busgreas/public_html/forum/library/core/class.dispatcher.php:872] UtilityController->update();
    [/home4/busgreas/public_html/forum/library/core/class.dispatcher.php:289] Gdn_Dispatcher->dispatchController();
    [/home4/busgreas/public_html/forum/index.php:29] Gdn_Dispatcher->dispatch();
    

    Variables in local scope:

    [sql] 'select MAX(p.`PermissionID`) as `PermissionID`, MAX(p.`Garden.Settings.Manage`) as `Garden.Settings.Manage`, MAX(p.`Garden.Settings.View`) as `Garden.Settings.View`, MAX(p.`Garden.Messages.Manage`) as `Garden.Messages.Manage`, MAX(p.`Garden.SignIn.Allow`) as `Garden.SignIn.Allow`, MAX(p.`Garden.Applicants.Manage`) as `Garden.Applicants.Manage`, MAX(p.`Garden.Users.Add`) as `Garden.Users.Add`, MAX(p.`Garden.Users.Edit`) as `Garden.Users.Edit`, MAX(p.`Garden.Users.Delete`) as `Garden.Users.Delete`, MAX(p.`Garden.Users.Approve`) as `Garden.Users.Approve`, MAX(p.`Garden.Activity.Delete`) as `Garden.Activity.Delete`, MAX(p.`Garden.Activity.View`) as `Garden.Activity.View`, MAX(p.`Garden.Profiles.View`) as `Garden.Profiles.View`, MAX(p.`Garden.Profiles.Edit`) as `Garden.Profiles.Edit`, MAX(p.`Garden.Moderation.Manage`) as `Garden.Moderation.Manage`, MAX(p.`Garden.Curation.Manage`) as `Garden.Curation.Manage`, MAX(p.`Garden.PersonalInfo.View`) as `Garden.PersonalInfo.View`, MAX(p.`Garden.AdvancedNotifications.Allow`) as `Garden.AdvancedNotifications.Allow`, MAX(p.`Conversations.Moderation.Manage`) as `Conversations.Moderation.Manage`, MAX(p.`Conversations.Conversations.Add`) as `Conversations.Conversations.Add`, MAX(p.`Vanilla.Discussions.View`) as `Vanilla.Discussions.View`, MAX(p.`Vanilla.Discussions.Add`) as `Vanilla.Discussions.Add`, MAX(p.`Vanilla.Discussions.Edit`) as `Vanilla.Discussions.Edit`, MAX(p.`Vanilla.Discussions.Announce`) as `Vanilla.Discussions.Announce`, MAX(p.`Vanilla.Discussions.Sink`) as `Vanilla.Discussions.Sink`, MAX(p.`Vanilla.Discussions.Close`) as `Vanilla.Discussions.Close`, MAX(p.`Vanilla.Discussions.Delete`) as `Vanilla.Discussions.Delete`, MAX(p.`Vanilla.Comments.Add`) as `Vanilla.Comments.Add`, MAX(p.`Vanilla.Comments.Edit`) as `Vanilla.Comments.Edit`, MAX(p.`Vanilla.Comments.Delete`) as `Vanilla.Comments.Delete`, MAX(p.`Plugins.Flagging.Notify`) as `Plugins.Flagging.Notify`, MAX(p.`Plugins.Attachments.Upload.Allow`) as `Plugins.Attachments.Upload.Allow`, MAX(p.`Plugins.Attachments.Download.Allow`) as `Plugins.Attachments.Download.Allow`, MAX(p.`Plugins.ElRte.Wysiwyg.Allow`) as `Plugins.ElRte.Wysiwyg.Allow`, MAX(p.`Plugins.ElRte.FileManager.Allow`) as `Plugins.ElRte.FileManager.Allow`, MAX(p.`Plugins.ElRte.FileManager.Root`) as `Plugins.ElRte.FileManager.Root`, MAX(p.`Plugins.ElRte.FileManager.Files.Read`) as `Plugins.ElRte.FileManager.Files.Read`, MAX(p.`Plugins.ElRte.FileManager.Files.Write`) as `Plugins.ElRte.FileManager.Files.Write`, MAX(p.`Plugins.ElRte.FileManager.Files.Remove`) as `Plugins.ElRte.FileManager.Files.Remove`, MAX(p.`Plugins.AptAds.Manage`) as `Plugins.AptAds.Manage`, MAX(p.`Plugins.Cleanser.Manage`) as `Plugins.Cleanser.Manage`, MAX(p.`Garden.Email.View`) as `Garden.Email.View`, MAX(p.`Vanilla.Approval.Require`) as `Vanilla.Approval.Require`, MAX(p.`Vanilla.Comments.Me`) as `Vanilla.Comments.Me`, MAX(p.`Plugins.Signatures.Edit`) as `Plugins.Signatures.Edit`, p.JunctionTable as `JunctionTable`, p.JunctionColumn as `JunctionColumn`, p.JunctionID as `JunctionID`
    from `GDN_Permission` `p`
    join `GDN_UserRole` `ur` on p.RoleID = ur.RoleID
    where `ur`.`UserID` = :urUserID
    group by `p`.`JunctionTable`, `p`.`JunctionColumn`, `p`.`JunctionID`'
    [inputParameters] array (
      ':urUserID' => '10873',
    )
    [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 \'p.Garden.Messages.Manage\' in \'field list\''
    [ex] array (
    )
    

    Need Help?

    If you are a user of this website, you can report this message to a website administrator.

    If you are an administrator of this website, you can get help at the Vanilla Community Forums.

    Additional information for support personnel:

    • Application: Vanilla
    • Application Version: 3.3
    • PHP Version: 7.3.13
    • Operating System: Linux
    • Server Software: Apache
    • User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
    • Request Uri: /forum/utility/update
    • Controller: PHP


  • FYI: I upgraded a Vanilla Forums 2.0.18.4 version to the newest 3.3 version - quite successful and quick. However, I had an issue to resolve manually (in the database) with attaching Images in Activities/Posts/Comments; it's documented over on GitHub:

    https://github.com/vanilla/vanilla/issues/9906

Sign In or Register to comment.