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.
Options

[Resolved] Upgrade Woes 2.1.13p3 -> 2.2 [500 Internal Server Error]

hgtonighthgtonight ∞ · New Moderator
This discussion was created from comments split from: Tutorial: A Fool Proof Way to do a Vanilla Upgrade from 2.1 to 2.2.

Search first

Check out the Documentation! We are always looking for new content and pull requests.

Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Comments

  • Options
    edited November 2015
    1. Error: When I visit CrisisForums.org, I receive a "500 Internal Server Error"

    2. Upgraded from 2.1.13p3 (I think?) to 2.2

    3. OSX El Capitan

    4. Php version 5.3

    5. Steps 5-8 followed.

    I've also added the "debug" line in config.php, but I'm not sure what it does, and I notice no changes anywhere.

    Any help would be much appreciated.

    EDIT:

    A-ha! It spit out this error:

    Fatal error: Call to protected method MessageModel::inCategory() from context '' in /hermes/bosnaweb10a/b613/nf.mattharley/public_html/applications/dashboard/models/class.messagemodel.php on line 184

    Is there anything I can do to fix this and get my website working again?

  • Options
    peregrineperegrine MVP
    edited November 2015

    MrCanadian said: Fatal error: Call to protected method MessageModel::inCategory() from context '' in /hermes/bosnaweb10a/b613/nf.mattharley/public_html/applications/dashboard/models/class.messagemodel.php on line 184

    Is there anything I can do to fix this and get my website working again?

    upgrade php to at least 5.4 or higher to get rid of error - would be the best choice

    yes. the problem occurs in php 5.3 but not in versions of php greater than 5.3

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

    you could change the applications/dashboard/models/class.messagemodel.php on line 89

    to public instead of protected

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    @peregrine said:

    MrCanadian said: Fatal error: Call to protected method MessageModel::inCategory() from context '' in /hermes/bosnaweb10a/b613/nf.mattharley/public_html/applications/dashboard/models/class.messagemodel.php on line 184

    Is there anything I can do to fix this and get my website working again?

    upgrade php to at least 5.4 or higher to get rid of error - would be the best choice

    yes. the problem occurs in php 5.3 but not in versions of php greater than 5.3

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

    you could change the applications/dashboard/models/class.messagemodel.php on line 184

    inCategory

    to public instead of protected

    I took a look at the links and the line of code, but I'm not exactly sure what to change, or where to put "public" - do I put it at the end outside of the final bracket?

  • Options
    peregrineperegrine MVP
    edited November 2015

    corrected.

    applications/dashboard/models/class.messagemodel.php on line 89

    protected static function inCategory($NeedleCategoryID, $HaystackCategoryID, $IncludeSubcategories = false) {

    to

    public static function inCategory($NeedleCategoryID, $HaystackCategoryID, $IncludeSubcategories = false) {

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    @peregrine said:
    on line 184

    do you see the word protected?

    if so replace the word with public.

    Hmm, I do not, I only see this (lines 183-185 in class.messagemodel.php) :

    $Result = array_filter($Result, function ($Message) use ($CategoryID) {
    return MessageModel::inCategory($CategoryID, val('CategoryID', $Message), val('IncludeSubcategories', $Message));
    });

  • Options
    peregrineperegrine MVP
    edited November 2015

    see above. my mistake and corrected.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    @peregrine said:
    read my comment several times and ignore everything else.

    I can't upgrade to php 5.4, if that's what you're referring to - I don't control the server machine the website is hosted on.

    You asked me to switch the word "protected" to "public" in that line of code, but when I go to that line of code there's no word "protected" it in, so I don't understand what I'm supposed to switch.

    Even the github link you provided has no word "protected" in it in the code.

    I've read your advice several times, but you're asking me to switch something that isn't there, so forgive my confusion. I honestly don't know what I should be doing.

  • Options

    @peregrine said:
    see above. my mistake and corrected.

    Alright, I'll try that out. Back in a moment.

  • Options

    @peregrine said:
    see above. my mistake and corrected.

    Genius. I appreciate your help, and I apologize for any frustration I may have caused - I truly appreciate the time you take to help me out when I have issues with all the things I encounter in this wily world of code and forums.

Sign In or Register to comment.