TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

June 26, 2024, 01:26:50 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,280
  • Total Topics: 21,227
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 182
  • Total: 182

whichbar - undefined variable

Started by tapirul, January 17, 2007, 07:08:59 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

iowamf

#10
I'm getting this now too - and I can duplicate it.

Create a brand new user and assign them into a primary membergroup - then login - problem shows up.

If a user registers by mail - problem doesn't show up.  However, if I assign that user into a membergroup - problem shows up.

Unfortunately, the problem is that their left blocks go away.

No mods, SMF1.1.1 TP0.7.1

What is weird - is that I had about 10 users in various membergroups (and still have those users) where there is no problem (everything works for those users).

IchBin

Well, I don't see this in the bug tracker so I think I'll add it. Bloc can decide what to do from there.

bloc

To solve the error, find that line where "$whichbar" is called in TPortal.php and set $whichbar=''; on a line above it.

iowamf

I stuck that above the if/elseif statement as shown below and the error is not showing up in the log.
However, the symptom of the leftbar disappearing is still present.

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

// check that we are in frontpage rather

bloc

Yes...if you look at the code there, thats the other bug as well lol. it should be:

if($allow){
// save which pan
$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';

// check that we are in frontpage rather

iowamf

Thanks - that appears to have worked - the left bars are back and no whichbar in the error log.

Easy as 1,2,3  8)

jagu

Yea, i just posted it on bugtracker... b4 i saw this post, anyways, thanks...

elliel

I just wanted to say that I got this error today,and the reason was, that I uninstalled TP, before upgrading smf.  But before I did that, I had moved all my left side blocks to the right.  Then when I reinstalled TP, it reinstalled with my same settings ie blocks on the right, none on the left, and this error popped up over and over. 

I moved them all back to the left and it disappeared. 

I just thought I'd mention it in case someone else does the same thing as I did :)

mprayii

Thank you, I was wondering what to do with this and was avoiding it, hoping it wouldnt cause any complications.... after I saw that I had almost 5000 pages of forum errors with this, I felt it was time for action.

It has been fixed.

Thanks tons!

skiller

Thanks for these easy tips on solving the bugs Bloc :)

Keep up the great work!