TinyPortal

Development => Support => Topic started by: Freddy on January 26, 2009, 02:39:01 PM

Title: Errors from TPortal.template.php
Post by: Freddy on January 26, 2009, 02:39:01 PM
Running:
ââ,¬Â¢ SMF 1.1.7
ââ,¬Â¢ TinyPortal v1.0.5 beta
ââ,¬Â¢ Theme; FS Gray by Fussilet.com

Hadn't noticed this until I went to download a backup of my forum which was huge - had over 200,000 errors of this type.  Forum is working fine but I would like to eliminate this error :

8: Undefined variable: current_action
File: /home/mfykbrna/public_html/aidreams.co.uk/forum/Themes/default/TPortal.template.php (main_above sub template - eval?)
Line: 497

This is obviously only one error as there are multiple errors for each page, which is why the error log got so massive.

Anyone familiar with this one ?

Many thanks.
Title: Re: Errors from TPortal.template.php
Post by: G6Cad on January 26, 2009, 02:42:56 PM
Seems like one or some of your mods that uses the array in default Core index.template.php are missing in your custom installed theme.
Check what mods you have that adds to the array and add the same for your custom theme
Title: Re: Errors from TPortal.template.php
Post by: Freddy on January 26, 2009, 02:53:35 PM
Hmm, not being an expert I don't know where to start on that - got any pointers ?

Thanks for quick reply.

The only mods I am using are:

• Tiny Portal
• SMF Gallery Lite
• and an RSS Feed poster that only gets called via a cron job.
Title: Re: Errors from TPortal.template.php
Post by: IchBin on January 26, 2009, 02:58:14 PM
Are the errors on different pages as well? Not just TPortal.template.php?

Attach your index.template.php file please.
Title: Re: Errors from TPortal.template.php
Post by: Freddy on January 26, 2009, 03:15:01 PM
Yeah the errors were all over the place.  I took G6's advice and had a look at the theme's index.template.php to see if anything was missing.  Found the problem - it was because I had commented out :

$current_action = 'home';

A while back I had been trying to control the tab which is highlighted for the page you are on.  I disabled that so 'home' didn't become highlighted when I was on an article page.  So that's why it was undefined - seems I need to learn a little more about PHP variables.

Sorry guys and girls, but thanks for pointing me in the right direction, the error messages have gone.
Title: Re: Errors from TPortal.template.php
Post by: JPDeni on January 26, 2009, 03:38:22 PM
I know you figured it out and that's cool. If you don't want the tab highlighted, you can change it to


$current_action = '';


It will be defined, but empty.

Then again, if it doesn't work, you can just change it back. :)
Title: Re: Errors from TPortal.template.php
Post by: Freddy on January 26, 2009, 03:40:25 PM
I was wondering about that, I will give it a go, thanks :)
Title: Re: Errors from TPortal.template.php
Post by: Freddy on January 26, 2009, 03:44:14 PM
Works perfectly :)