Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Update check fault

uziuzi
edited May 2006 in Vanilla 1.0 Help
If I open the update check in the menu there is an error shown:

Fatal error: Call to a member function on a non-object in /var/www/s16u38/html/hessen/lussumo/themes/settings_update_check_nopostback.php on line 29

is it "normal" for svn at the moment?

Comments

  • MarkMark Vanilla Staff
    Hmmm. You shouldn't be getting that error.

    What revision are you on?
  • uziuzi
    edited May 2006
    421, but this error was there from the beginning of the update feature. I thought it's due to the script development.

    image

    If I check the update, everything seems to be alright:

    image

    ...but it only seems. This notification doesn't disappear:

    image

    Should this update status be written to the database? I think my database structure is inconsistent... I have following rows there:

    * Browse LUM_Category
    * Browse LUM_CategoryBlock
    * Browse LUM_CategoryRoleBlock
    * Browse LUM_Clipping
    * Browse LUM_Comment
    * Browse LUM_CommentBlock
    * Browse LUM_Discussion
    * Browse LUM_DiscussionUserWhisperFrom
    * Browse LUM_DiscussionUserWhisperTo
    * Browse LUM_IpHistory
    * Browse LUM_Role
    * Browse LUM_Style
    * Browse LUM_User
    * Browse LUM_UserBlock
    * Browse LUM_UserBookmark
    * Browse LUM_UserDiscussionWatch
    * Browse LUM_UserRoleHistory
    * Browse LUM_UserSearch
  • ithcyithcy New
    edited May 2006
    it's actually not written to the database, but to conf/settings.php. i have this line in mine:
    $Configuration['LAST_UPDATE'] = '1147040566';

    my guess is that your library/Framework/Framework.Control.UpdateCheck.php is out of date, but i'll defer to mark.
  • MarkMark Vanilla Staff
    edited May 2006
    There is definitely something wierd going on with your copy of the code. In your screenshot the "you haven't checked for vanilla updates yet" text is plain, but the latest stylesheet has a different style applied to that.

    If I were you, I'd back up my conf files and then delete the entire repository and re-check-out the whole thing from svn. Then paste in your old conf files.
  • Hi Mark,

    I have reinstalled Vanilla, now the notification-style is visible, but the error is still there.
  • MarkMark Vanilla Staff
    edited May 2006
    Alright, let's get to the bottom of this.

    Open up library/Framework/Framework.Control.UpdateCheck.php

    From lines 27 to 40, change it from this:

    if ($this->IsPostBack) { $this->Context->PageTitle = $this->Context->GetDefinition('UpdatesAndReminders'); $this->ReminderSelect = $this->Context->ObjectFactory->NewObject($this->Context, 'Select'); $this->ReminderSelect->Name = 'ReminderRange'; $this->ReminderSelect->AddOption('', $this->Context->GetDefinition('Never')); $this->ReminderSelect->AddOption('Weekly', $this->Context->GetDefinition('Weekly')); $this->ReminderSelect->AddOption('Monthly', $this->Context->GetDefinition('Monthly')); $this->ReminderSelect->AddOption('Quarterly', $this->Context->GetDefinition('Quarterly')); $this->ReminderSelect->SelectedValue = $this->Context->Configuration['UPDATE_REMINDER']; $SettingsFile = $this->Context->Configuration['APPLICATION_PATH'].'conf/settings.php'; }

    to this

    echo 'IsPostBack: '.GetBool($this->IsPostBack); if ($this->IsPostBack) { echo '<div>about to set up ReminderSelect</div>'; $this->Context->PageTitle = $this->Context->GetDefinition('UpdatesAndReminders'); $this->ReminderSelect = $this->Context->ObjectFactory->NewObject($this->Context, 'Select'); $this->ReminderSelect->Name = 'ReminderRange'; $this->ReminderSelect->AddOption('', $this->Context->GetDefinition('Never')); $this->ReminderSelect->AddOption('Weekly', $this->Context->GetDefinition('Weekly')); $this->ReminderSelect->AddOption('Monthly', $this->Context->GetDefinition('Monthly')); $this->ReminderSelect->AddOption('Quarterly', $this->Context->GetDefinition('Quarterly')); $this->ReminderSelect->SelectedValue = $this->Context->Configuration['UPDATE_REMINDER']; print_r($this->ReminderSelect); $SettingsFile = $this->Context->Configuration['APPLICATION_PATH'].'conf/settings.php'; }


    See, on line 29 of settings_update_check_nopostback.php, it calls the get method of the ReminderSelect object. And according to your error, that object isn't properly defined. So I want to find out why the hell it's happening.

    Once you've changed that code, save the file and go back to the updatecheck form. There will be a bunch of garbage spit out onto the screen (I hope). Copy and paste (or screen grab) it in here.
  • Hm... whether I am blind or there is something very wrong, this is the content of my Framework.Control.UpdateCheck.php:

    <?php /* * Copyright 2003 - 2005 Mark O'Sullivan * This file is part of Vanilla. * Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. * Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * The latest source code for Vanilla is available at www.lussumo.com * Contact Mark O'Sullivan at mark [at] lussumo [dot] com * * Description: The UpdateCheck control is used to ping the lussumo.com server to check for upgrades to Vanilla. */ class UpdateCheck extends PostBackControl { var $LussumoMessage; function UpdateCheck(&$Context) { $this->Name = 'UpdateCheck'; $this->ValidActions = array('UpdateCheck', 'ProcessUpdateCheck'); $this->Constructor($Context); if (!$this->Context->Session->User->Permission('PERMISSION_CHECK_FOR_UPDATES')) { $this->IsPostBack = 0; } elseif ($this->IsPostBack && $this->PostBackAction == 'ProcessUpdateCheck') { // Ping lussumo.com for update information $Lines = file($this->Context->Configuration['UPDATE_URL'] .'?Application='.APPLICATION .'&Version='.APPLICATION_VERSION .'&Language='.$this->Context->Configuration['LANGUAGE']); $this->LussumoMessage = implode('\r\n', $Lines); $this->PostBackValidated = 1; } $this->CallDelegate('Constructor'); } function Render_ValidPostBack() { $this->CallDelegate('PreValidPostBackRender'); include(ThemeFilePath($this->Context->Configuration, 'settings_update_check_validpostback.php')); $this->CallDelegate('PostValidPostBackRender'); } function Render_NoPostBack() { if ($this->IsPostBack) { $this->CallDelegate('PreNoPostBackRender'); $this->PostBackParams->Clear(); $this->PostBackParams->Set('PostBackAction', 'ProcessUpdateCheck'); include(ThemeFilePath($this->Context->Configuration, 'settings_update_check_nopostback.php')); $this->CallDelegate('PostNoPostBackRender'); } } } ?>

    I think my RapidSVN doesn't check the People and Framework folders properly....
  • Hm...

    Framework: revision 38
    People: revision 33
  • MarkMark Vanilla Staff
    There's your problem.

    Your framework and people repositories aren't getting updated.
  • I thought they are getting updated with the other files too, because they are listed as svn:externals. Damned RapidSVN...

    Do you know how to turn the automatic update of externals on?
  • If you're running under windows, I'd say trade up from RapidSVN to TortiseSVN and just rebuild your repositories. Tortise appears to be the best SVN manager out there so far out of all that i've tried. The only hitch is they update the client VERY frequently, it seems like every week.
  • Installed TortoiseSVN, updated, uploaded and everything is perfect now :)))))))

    Thank you guys ;)
This discussion has been closed.