Please upgrade here. These earlier versions are no longer being updated and have security issues.

Empty forum page nad HTTP 500 after upgrade from 2.0.18 (have access to dashboard)

JoosBuijsJoosBuijs New
edited August 2015 in Vanilla 2.0 - 2.3

Hi all,

I just followed all installation instructions (including deleting the files and uploading the net .htaccess file) for my upgrade from Vanilla forums 2.0.18 to 2.2b1.

However, when I want to access my forum I get an empty page (page source shows it's really empty). I get an HTTP 500 Internal server error in IE. I do have access to my dashboard.

I have followed the instructions from http://docs.vanillaforums.com/developers/troubleshooting/ but I suspect my .htaccess file is the cause. I have enabled the RewriteBase to the correct subfolder (I believe). Is there anything else I can try?

Comments

  • AdrianAdrian Wandering Spirit Montreal Vanilla Staff

    Who is your host? Does it work if you use the old .htaccess ?

    Sharing is caring

  • AdrianAdrian Wandering Spirit Montreal Vanilla Staff
    edited August 2015

    Sharing is caring

  • Dear Adrian,

    Thank you for the swift reply!

    My host is a non-commercial one (webserver is installed by IT in our institution).
    With their help I was able to find the following error message in the Apache error log:

    PHP Fatal error: Call to protected method MessageModel::inCategory() from context '' in /var/www/win/promforum/applications/dashboard/models/class.messagemodel.php on line 184

    Since changing 'MessageModel' to 'self' did not work, I made the inCategory function public, and now it seems to work (still need to give it a thorough test run).

    Not sure if this is a bug?
    The server is running PHP 5.3.3, Apache 2.2.15 and MySQL 5.1.73.

    Thnx for the help!

    peregrine
  • mtschirsmtschirs ✭✭✭
    edited August 2015

    Might really be an issue that needs to be fixed in Vanilla. Line 183-185 of class.messagemodel.php:

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

    The closure no longer has access to private or protected members of MessageModel. A solution could be (PHP >=5.4) http://au.php.net/manual/en/closure.bind.php or, as @JoosBuijs suggested, make MessageModel::inCategory() public.

    See also http://stackoverflow.com/questions/6644288/using-self-in-an-anonymous-callback for a similar issue.

    -

    Bleistivtvrijvlinderperegrine
  • peregrineperegrine MVP
    edited November 2015

    yes this is still an issue with 2.2 and php 5.3 requirement in readme, creating a bug in 2.2

    @JoosBuijs nice work around

    @mtschirs, thanks for filing issue https://github.com/vanilla/vanilla/issues/3016

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

Sign In or Register to comment.