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.
[Resolved] Upgrade Woes 2.1.13p3 -> 2.2 [500 Internal Server Error]
![hgtonight](https://us.v-cdn.net/5018160/uploads/userpics/205/nQM3WWQ1NUY1C.png)
This discussion was created from comments split from: Tutorial: A Fool Proof Way to do a Vanilla Upgrade from 2.1 to 2.2.
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.
0
Comments
Error: When I visit CrisisForums.org, I receive a "500 Internal Server Error"
Upgraded from 2.1.13p3 (I think?) to 2.2
OSX El Capitan
Php version 5.3
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?
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.
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?
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.
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));
});
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.
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.
Alright, I'll try that out. Back in a moment.
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.