Error: "8: Undefined variable: settings"

Started by sangham.net, April 23, 2013, 03:33:18 AM

Previous topic - Next topic

sangham.net

Dear SMF friends,

sorry if I posted it on the wrong place, I had try to find a proper existing topic, but could not figure such out. For sure my SMF syntax (usual language) is to poor for good researches. So please apologies and don't be annoyed.

I got an error message:

8: Undefined variable: settings
21 File: .../Themes/default/languages/TPortal.german-utf8.php (tp_above sub template - eval?)
Line: 21

or
.../Themes/default/languages/TPortal.english-utf8.php (tp_above sub template - eval?)

which appeared since about a month ago (there was nothing special changed at this time it started to appear, except a lot of boad and member permission setting changes), as I had seen, and had caused some thousands entries of errors in the log.

Beside it, everything runs fine and is just visible in the log but fills up the log constantly.

If you have any idea what might be the reason and a easy may to understand how to correct it for dummies, please let me know.

Thank you much in advanced!






Link to my forum: sangham dot net
SMF version: SMF ver. 2.0.4
TP version: TP ver. 1.0
Default Forum Language: english
Theme name and version: small layout modifications based core
Browser Name and Version: firefox 18.0.2 (just upload activated while searching for version)
Mods installed: Tagging System2.4.3, Menu Editor Lite    1.0.5, (Add Facebook Like, Tweet, and Google +1 1.0.3a - deinstalled again), Quick Translation 0.8, TinyPortal 1.107, SEO Sitemap 2.2.1, Language Drop Down    1.5.3, KeyCAPTCHA for SMF    2.4, New Hooks 0.2, Login Security 1.0.2.2, SMF Quiz    1.1.0

kat

Try posting here, Johann.

http://www.simplemachines.org/community/index.php?topic=27642.0

It's definitely a Tiny Postal problem. They might ask you to go to Admin>Server settings, to "Disable evaluation of templates", first, so that you get the true error messages.

sangham.net



sangham.net

Admin>Server settings Ohh... this... "This page allows you to change the basic settings for your forum. Be very careful with these settings, as they may render the forum dysfunctional. " ...makes me a little nervous... ...should I. should I not...? maybe I should sleep one night over it

Kindred

Actually...  turning off eval will probably not have any effect in this case.

1- address TinyPortal issues in the tinyPortal support thread.
2- most issues with portals that flag as eval are actually because of some badly written or poorly defined ccode that the user has added to a portal block.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


sangham.net

Just like to inform you that I could find it after your hint "most issues with portals that flag as eval are actually because of some badly written or poorly defined ccode that the user has added to a portal block" with simply deactivate all blocks and watching the log and turn on one after the other. So I found that it was a "recent Topic block" which might have any mistake or special inside.

global $context, $modSettings, $txt;
$context['TPortal']['recentboxnum'] = '15';

if(isset($modSettings['recycle_board']))
$bb = $modSettings['recycle_board'];

$what = ssi_recentTopics($context['TPortal']['recentboxnum'], NULL, NULL, 'array');
$counter=1;
$cmax = count($what);

echo '
<div style="width: 100%; overflow: auto; height: 30ex;">';

foreach($what as $w)
{
echo '
<div class="smalltext"><a href="'.$w['href'].'">' . $w['short_subject'] . '</a></div>
<div class="smalltext">', $txt['by'], ' <b>', $w['poster']['link'], '</b></div>
<div class="smalltext">';
if(!$w['new'])
echo '<a href="'.$w['href'].'"><img border="0" src="'.$settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a> ';

echo '['.$w['time'].']
</div>';

if($counter != $cmax)
echo '<hr />';
$counter++;
}
echo '
</div>';


Thanks a lot!!


Advertisement: