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.

1.1.1 Upgrade problem

edited March 2007 in Vanilla 1.0 Help
I upgraded from 1.0.3 to 1.1.1 I'm getting this error message in the discussions page: Fatal error: Call to a member function on a non-object in /home/httpd/vhosts/youthopea.com/httpdocs/forum/library/Vanilla/Vanilla.Functions.php on line 18 I had a look at the code and the error points to this line: if ($Discussion->Sticky && $Context->GetDefinition('TextSticky') != '' && $Prefix != '') $Prefix .= ', '; I'm not sure what the problem, anyone can help?
«1

Comments

  • MarkMark Vanilla Staff
    Are you using the default theme, or some other theme?
  • I got this error while using the Vanilla Blue Theme. I just replaced this file with the one from the 1.04 release which works fine for me.
  • reapreap New
    edited March 2007
    updated from 1.1 to 1.1.1 just copied the 7 files get this now on main page: Notice: Undefined index: TEXT_WHISPERED in *blah**/library/Vanilla/Vanilla.Functions.php on line 30 Notice: Undefined index: TEXT_WHISPERED in *blah**/library/Vanilla/Vanilla.Functions.php on line 31 base theme
  • MarkMark Vanilla Staff
    All of these errors are because a function changed in the discussion.php theme file. If you update to the new theme file, it will work. Here is what your discussion.php file *should* look like in order to work properly: http://lussumo.com/svn/vanilla/trunk/themes/discussion.php
  • Sorry my mistake, I was still using the theme files from 1.0.3, using the theme files from the 1.1.1 release works.

    Thanks Mark, love your work.
  • MarkMark Vanilla Staff
    :D
  • Would you be able to help me modify my current discussion.php file to work for 1.1.1 - I can't use yours because that will make my site look very fugly. ;) It worked fine for 1.0.4 but what ever changes were made in the 1.1.1 release causes the Sticky text to not show up before sticky topics. <?php // Note: This file is included from the library/Vanilla/Vanilla.Control.SearchForm.php // class and also from the library/Vanilla/Vanilla.Control.DiscussionForm.php's // themes/discussions.php include template. if(!isset($AltRow)) $AltRow = ""; $UnreadUrl = GetUnreadQuerystring($Discussion, $this->Context->Configuration, $CurrentUserJumpToLastCommentPref); $NewUrl = GetUnreadQuerystring($Discussion, $this->Context->Configuration, 1); $LastUrl = GetLastCommentQuerystring($Discussion, $this->Context->Configuration, $CurrentUserJumpToLastCommentPref); $DiscussionList .= ' <tr class="'.$Discussion->Status.($Discussion->CountComments == 1?' NoReplies':'').' '.$AltRow.'"> <td class="tcl"> <div class="intd"> <div class="icon"><div class="nosize"><!-- --></div></div> <div class="tclcon"> <span class="stickytext">'.DiscussionPrefix($this->Context->Configuration, $Discussion).'</span> <a href="'.$UnreadUrl.'">'.$Discussion->Name.'</a> <span class="byuser">'.$Discussion->AuthUsername.'</span> </div> </div> </td> <td class="tc2">'.$Discussion->CountComments.'</td> <td class="tc3">'.$Discussion->NewComments.'</td> <td class="tcr"> <a href="'.$LastUrl.'">'.TimeDiff($this->Context, $Discussion->DateLastActive,mktime()).'</a> <span class="byuser">'.$Discussion->LastUsername.'</span> </td> </tr> '; $AltRow = ($AltRow == "") ? "alt" : ""; ?>
  • MarkMark Vanilla Staff
    Change this:

    DiscussionPrefix($this->Context->Configuration, $Discussion)

    to this:

    DiscussionPrefix($this->Context, $Discussion)
  • Thanks! Works great, for anyone else using the Vanilla Blue Theme this seems to be the only change you need to make for 1.1.1
  • I don't know, I've changed the discussion.php file but I still get this error: Fatal error: Cannot use object of type Context as array in /home/xxxxxxxxxx/public_html/vanilla/library/Vanilla/Vanilla.Functions.php on line 24 Where's this code goes? Change this: <code>DiscussionPrefix($this->Context->Configuration, $Discussion)</code> to this: <code>DiscussionPrefix($this->Context, $Discussion)</code>
  • MarkMark Vanilla Staff
    That line is in the themes/your_theme_name/discussion.php file.
  • Okay I just noticed now that when you make this change, the Sticky text comes up fine - but when you click on a Sticky topic it loads the link but not the posts under the thread. It doesn't give any errors. Any ideas why?
  • Never mind same issue, in your comments.php file change

    $DiscussionName = DiscussionPrefix($this->Context->Configuration, $this->Discussion).' ';

    $DiscussionName = DiscussionPrefix($this->Context, $this->Discussion).' ';

    Around line 24.
  • Andy KAndy K
    edited March 2007
    Hey all, Just wanted to chime in:

    I was seeing similar errors in different areas of Vanilla.Functions.php. Turns out it was because I was using the awesome NamedVanilla theme (actually copied the theme's contents over the default theme): It looks like NamedVanilla doesn't quite work with 1.1.1. I'll see about contacting JasonP to make some fixes.

    Thanks!

    -Andy
  • Error Message The "ApplicantsForm" control referenced by "ApplicantsForm" does not appear to exist. Affected Elements ObjectFactory.CreateControl(); (when clicking on Settings tab) and: Warning: Variable passed to each() is not an array or object in /homepages/12/d88715097/htdocs/site.org/forum/themes/head.php on line 10 (when viewing the main discussion page)
  • @ rod: I would try to re-upload the vanilla files.
  • I had to do it via FTP upload rather than just through SSHD. Now, the extensions update checking feature is either broken or taking a really, really long time. Also, my themes are almost all broken. What gives? All I did was upload everything on top of my old forum, minus the extensions and conf directories...
  • Did you "Accidently uploaded php files as Binary instead of ASCII."?
  • No, I think Bulletproof FTP knows that php files are to be uploaded in ASCII instead of Bin
  • robbrobb New
    edited March 2007
    In addition, now when I try to enable extensions through the control panel, the box next to the extensions simply check, but they don't actually enable. Am I doing something wrong? I'm thinking about backing up my database and reinstalling everything because this a really messy upgrade (probably my fault).
This discussion has been closed.