Strange Errors In Log

Started by Blinker, February 14, 2009, 09:01:14 PM

Previous topic - Next topic

Blinker

When I checked my error log today there were over 21 pages of errors. All of them were as two errors for the same time and saying this:

8: Undefined offset: 533
File: /home/content/x/x/x/xxxxxxxxx/html/forum/Themes/default/languages/Post.english.php (eval?)
Line: 967

8: Undefined offset: 532
File: /home/content/x/x/x/xxxxxxxxx/html/forum/Themes/default/languages/Post.english.php (eval?)
Line: 966


These same two errors were then repeated hundreds and hundreds of times for every member who's been on the board since 11 Feb.

My post.english.php file only has 197 lines in it, so what exactly is the error referring to?

My guess is that this has something to do with the Hack's Park Colour Picker mod, the Font Size & Font Face mod or the Enhanced Dropdown mod as they all kinda work together and were all installed/upgraded when the errors started on 11 Feb.

I had a look at the post.template.php file and lines 966 & 967 were smack bang in the middle of some Hack's Park Colour Picker code, but nothing seemed out of place.

Any ideas guys?


JimM

You can turn off the template eval by running the following query in phpMyAdmin:

INSERT INTO smf_settings VALUES ('disableTemplateEval', 1);

Clear your error log and browse around a bit, then copy and paste the errors here.

This query will turn the template eval back on:

DELETE FROM smf_settings WHERE variable = 'disableTemplateEval';
Jim "JimM" Moore
Former Support Specialist

Blinker

Will do, thanks Jim. I'll report back soon.

Blinker

OK, the new errors are:

8: Undefined offset: 533
File: /home/content/x/x/x/xxxxxxxxx/html/forum/Themes/mesh114/Display.template.php
Line: 967

8: Undefined offset: 532
File: /home/content/x/x/x/xxxxxxxxx/html/forum/Themes/mesh114/Display.template.php
Line: 966

I opened my custom theme's display.template.php and here are lines 966 & 967:

'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]),
         'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]),


I'm pretty sure 10pt Verdana is SMF's default font & size and it looks like  those mods I mentioned have caused this issue. Everything still works but there are far too many errors being generated.

What should I do?

JimM

#4
Which Font Size & Font Face mod are you using?  This one replaces $txt[532] and $txt[533] in Post.english.php but I don't see any edits in Display.template.php.

ETA:  Forgot the link: http://custom.simplemachines.org/mods/index.php?mod=639
Jim "JimM" Moore
Former Support Specialist

Blinker

#5
Yep, that's the one I'm using.

You're right, there are no corresponding edits to display.template.php. I guess as soon as I installed the errors must've started.

I only installed it because it was required in order for Nibogo's Enhanced Dropdown to work:http://custom.simplemachines.org/mods/index.php?mod=1624

So how can I edit my display file? 532 & 533 are completely gone and have been replaced by

$txt['font_face'] = 'Font Face';
$txt['font_arial'] = 'Arial';
$txt['font_times'] = 'Times New Roman';
$txt['font_comic'] = 'Comic Sans MS';
$txt['font_verd'] = 'Verdana';
$txt['font_heatt'] = 'Haettenschweiler';
$txt['font_taho'] = 'Tahoma';
$txt['font_size'] = 'Font Size';
$txt['size_9'] = '9pt';
$txt['size_10'] = '10pt';
$txt['size_11'] = '11pt';
$txt['size_12'] = '12pt';
$txt['size_13'] = '13pt';
$txt['size_14'] = '14pt';


Edit: I notice the author has just released v1.3 yesterday. I installed a few days ago and my package manager says v1.3 already. Weird.

JimM

Ahhh I see why.  The /Themes/default/Display.template.php does not contain those variables.  It must be something specific with your theme.  I would add them back in the Post.english.php file for now, right about where the mod removed them and then pm your theme author or post in the theme specific topic.
Jim "JimM" Moore
Former Support Specialist

Blinker

OK will do Jim, and thanks for all your help, I really appreciate it.

One thing I noticed - in the last set of changes the mod makes to post.template.php, it removes those exact lines about 10pt Verdana that are in my custom theme's display.template.php. I assume that's where the error is coming from.

JimM

It could be.  You can experiment with removing those lines in your Display.template.php file then and see if that clears it up.  I would still ask in the theme support topic or maybe even in the mod topic.

Glad to help out.  I enjoy doing it.
Jim "JimM" Moore
Former Support Specialist

Advertisement: