TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: robbie93 on April 30, 2010, 12:31:14 AM

Title: Errors
Post by: robbie93 on April 30, 2010, 12:31:14 AM
Hi, I have these errors in my logs

8: Undefined index: leftbar
File: /home/****/public_html/Themes/default/languages/TPShout.english.php (main_above sub template - eval?)
Line: 311

8: Undefined index: rightbar
File: /home/****/public_html/Themes/default/languages/TPShout.english.php (main_above sub template - eval?)
Line: 313
Title: Re: Errors
Post by: G6Cad on April 30, 2010, 07:49:26 AM
Thank you most kindly for reading our posting guidelines before asking for support  O0  ;D

These errors are due to you using an outdated theme for the new versions of SMF and TP.
Set your site to default SMF theme and clear your error log and you will see they are gone.

The theme ( you didnt tell us what theme or versions you are using ) are to old to use with the newer versions, it needs to be updated, however you can more or less edit the index.template.php file your self for the theme in use and remove the panel tp code from it. Offcourse make a backup of the file before you try and edit it.

Find and remove
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                var current_leftbar = ', empty($options['collapse_leftbar']) ? 'false' : 'true', ';

                function shrinkHeaderLeftbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        smf_setThemeOption("collapse_leftbar", mode ? 1 : 0, null, "', $context['session_id'], '");';
        echo '
                        document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("leftbarHeader").style.display = mode ? "none" : "";

                        current_leftbar = mode;
                }
          // ]]></script>
       <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                var current_rightbar = ', empty($options['collapse_rightbar']) ? 'false' : 'true', ';

                function shrinkHeaderRightbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        smf_setThemeOption("collapse_rightbar", mode ? 1 : 0, null, "', $context['session_id'], '");';

        echo '
                        document.getElementById("upshrinkRightbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("rightbarHeader").style.display = mode ? "none" : "";

                        current_rightbar = mode;
                }
        // ]]></script>
Title: Re: Errors
Post by: robbie93 on April 30, 2010, 05:01:02 PM
G6, I know how you just love people who stick to the posting guidelines, that's why I didn't  ;D

SMF 1.1.11 - TinyPortal 1.0 beta 5.1   ;D 

The code you posted cannot be found anywhere in the themes index.template... I hunted high and low, I even looked under the bed, but nope  :knuppel2: it isn't anywhere to be seen.
Title: Re: Errors
Post by: IchBin on May 02, 2010, 12:42:23 AM
What theme are you using? Do you get the same errors if you use the SMF default theme?
Title: Re: Errors
Post by: robbie93 on May 02, 2010, 10:10:43 PM
Theme is Diablo3 theme by Vaun http://custom.simplemachines.org/themes/index.php?lemma=779

And no the error isnt showing when using the default theme, any ideas how to stop the error with the theme in use?
Title: Re: Errors
Post by: IchBin on May 02, 2010, 11:11:00 PM
Do you have any TP template files in your theme directory? If you do, remove them as they are likely out of date. If not, zip up your theme and attach it to a post so I can look at the whole thing.
Title: Re: Errors
Post by: robbie93 on May 02, 2010, 11:20:45 PM
Hmm I dont see any TP files in the theme directory, here is the theme, thanks for looking.
Title: Re: Errors
Post by: IchBin on May 03, 2010, 12:00:15 AM
At a glance the theme looks ok. Can you Enable eval() (http://www.simplemachines.org/community/index.php?topic=290186.0) and see if the error changes in anyway? Should hopefully give a different filename for the error. I don't have a SMF1.1.x install that I can install this on to test.
Title: Re: Errors
Post by: robbie93 on May 03, 2010, 12:13:51 AM
Ok I enabled eval() after I ran the query I got this 1 row(s) affected. ( Query took 0.0003 sec )
REPLACE INTO smf_settings
VALUES (
'disableTemplateEval', 0
);


Did I do it right? hope so...  I'll keep checking the error logs now and see what the error says, and report back, thanks for your help.
Title: Re: Errors
Post by: IchBin on May 03, 2010, 12:53:12 AM
Looks fine to me. Post back when you can.
Title: Re: Errors
Post by: robbie93 on May 03, 2010, 07:07:24 PM
Ok, I got this 8: Undefined index: avatar

File: /home/****/public_html/Themes/default/languages/TPShout.english.php (main sub template - eval?)
Line: 58

Has it got anything to do with this though? http://www.tinyportal.net/index.php?topic=32237

Maybe I should wait for the fix in the next update.
Title: Re: Errors
Post by: IchBin on May 03, 2010, 08:50:12 PM
That looks like an error with a block code snippet or something. I don't think it has anything to do with your theme problem though.
Title: Re: Errors
Post by: robbie93 on May 04, 2010, 01:38:48 AM
The only block code I am using is the "new stats" block that is on display at the registration page, do you think that is what is causing the error?
Title: Re: Errors
Post by: IchBin on May 04, 2010, 02:50:02 PM
I have no idea which code snippet that is, so I have no idea.
Title: Re: Errors
Post by: Blue Steel on May 05, 2010, 01:07:00 AM
the way to check it is to disable it and see if you are still getting the error ;)

thats how i have found which block is causing the errors . I also generally only add one block at a time and then put the site through its paces and check for errors. Some errors only appear when people aren't logged in so i test that too.. then i add / edit another .

Hope this helps ;)
Title: Re: Errors
Post by: IchBin on June 01, 2010, 03:26:17 PM
topic split:
http://www.tinyportal.net/index.php?topic=32783.0