TinyPortal

Development => Support => Topic started by: techno_dracula on December 09, 2006, 03:12:42 PM

Title: Undefined variable: whichbar
Post by: techno_dracula on December 09, 2006, 03:12:42 PM
Undefined variable: whichbar
File: /xxx/xxx/public_html/Sources/TPortal.php
Line: 279

Where is whichbar defined? I am getting literally thousands of error pages because of this one error. :|

Using SMF 1.1, 0.9.7 TP, Double Posts Merge is the only other mod I have installed.
Title: Re: Undefined variable: whichbar
Post by: techno_dracula on December 09, 2006, 04:02:11 PM
I am trying to find it on my own, but so far no luck.  TPortal.php seems to be the only place where it's mentioned.  Something about showing certain items?

         // check that we are in frontpage rather
if($mypage!='' && !isset($_GET['page']) && $context['TPortal']['is_front'] && $mypage==$context['TPortal']['featured_article'])
$show=get_blockaccess($row['access2'],true, $whichbar);
else
$show=get_blockaccess($row['access2'],false, $whichbar);


And I am not using any php blocks.

I hope someone can help me here.  I had to shut off the error logging, and thats making me highly uneasy. =\
Title: Re: Undefined variable: whichbar
Post by: techno_dracula on December 09, 2006, 04:58:48 PM
I just tried uninstalling and reinstalling.  I checked the index.template.php file and there's nothing suspicious there that might be causing this error.

Seriously, do any of you just need more info on this error?  I'm going nuts. =\
Title: Re: Undefined variable: whichbar
Post by: G6Cad on December 09, 2006, 05:01:45 PM
Have you set your forum to the SMF default Core theme when you installed TP, and do you have this error in the Default theme aswell ?

Any other mods installed besides TP ?

What theme are you using besides the Default theme ?
Other language set ?
Title: Re: Undefined variable: whichbar
Post by: techno_dracula on December 09, 2006, 05:04:16 PM
Have you set your forum to the SMF default Core theme when you installed TP, and do you have this error in the Default theme aswell ? Yes and yes.  This problem only started happening today, and I have had TP installed since Tuesday.

Any other mods installed besides TP ? Merge Double Posts

What theme are you using besides the Default theme ? None, just default
Other language set ? Just English
Title: Re: Undefined variable: whichbar
Post by: G6Cad on December 09, 2006, 05:07:33 PM
The only thing i can think of right now if if you uninstall the other mod and see if the error goes away, or if you have any custom blocks that may cause errors to the articles, what do you have in your articles ? RSS feed or any thing else that uses remote connection ?
Title: Re: Undefined variable: whichbar
Post by: techno_dracula on December 09, 2006, 05:12:02 PM
Just uninstalled the extra mod, no change, still same error as above.

The only blocks I have are bbc/html, a shoutbox, a newsbox and a userbox.
Title: Re: Undefined variable: whichbar
Post by: bloc on December 09, 2006, 05:19:00 PM
Its a bug. I will add the fix into a re-relase of 0.9.7 tonight. As 0.9.7 user you can upload the files and it will be updated. If you want just that fix, find thsi in TPortal.php:

// save which pan
if($row['bar']=='1')
$whichbar='hide_leftbar_forum';
elseif($row['bar']=='1')
$whichbar='hide_rightbar_forum';
elseif($row['bar']=='1')
$whichbar='hide_centerbar_forum';


with this:
// save which panel
$whichbar='';
if($row['bar']=='1')
$whichbar='hide_leftbar_forum';
elseif($row['bar']=='2')
$whichbar='hide_rightbar_forum';
elseif($row['bar']=='3')
$whichbar='hide_centerbar_forum';
Title: Re: Undefined variable: whichbar
Post by: techno_dracula on December 09, 2006, 05:23:36 PM
THANK YOU!!  I cannot control my happiness.  I was seriously getting sick.  It worked.  Thank you so much. ~
Title: Re: Undefined variable: whichbar
Post by: bloc on December 09, 2006, 05:37:39 PM
:)