News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Every page generates 4 errors..

Started by Sramota, September 21, 2009, 05:14:34 AM

Previous topic - Next topic

Sramota

Having recently started using SMF I'm a bit annoyed by the 2500ish errors I got in 2 days of activity,
I cleaned the error log and clicked on it once,
this in itself generated 4 errors straight away

them being

Code ("First") Select

8: Use of undefined constant forum - assumed 'forum'
File: /customers/blood-bowl.se/blood-bowl.se/httpd.www/Themes/default/Errors.template.php (main_above sub template - eval?)
Line: 554


Code ("Second") Select
8: Undefined index:  theme_color
File: /customers/blood-bowl.se/blood-bowl.se/httpd.www/Themes/default/Errors.template.php (main_above sub template - eval?)
Line: 202

Code ("Third") Select
8: Undefined index:  theme_color
File: /customers/blood-bowl.se/blood-bowl.se/httpd.www/Themes/default/Errors.template.php (main_above sub template - eval?)
Line: 201

Code ("Fourth") Select
8: Undefined index:  theme_change
File: /customers/blood-bowl.se/blood-bowl.se/httpd.www/Themes/default/Errors.template.php (main_above sub template - eval?)
Line: 199


What are these and what can I do to fix them..?

Using
SMF 1.1.10


Arantor

Has anything changed in the last couple of days, any new mods installed, theme changed?

Sramota

Roughly everything has changed,
fixed a theme to work with the portal,
installed the whole thing,
moved the whole thing to another server,
installed a few packages,
etc... :S

Arantor

One or more of those changes has affected it.

The problem is right now we can't tell exactly where the issue is due to template eval being carried out.

Install this mod, then tick the box it gives you (as shown in the screenshots on that page), then see what errors you get after that.

Sramota

8: Use of undefined constant forum - assumed 'forum'
File: /customers/blood-bowl.se/blood-bowl.se/httpd.www/Themes/footballmulticolor/index.template.php
Line: 554

8: Undefined index: theme_color
File: /customers/blood-bowl.se/blood-bowl.se/httpd.www/Themes/footballmulticolor/index.template.php
Line: 202

8: Undefined index: theme_color
File: /customers/blood-bowl.se/blood-bowl.se/httpd.www/Themes/footballmulticolor/index.template.php
Line: 201

8: Undefined index: theme_change
File: /customers/blood-bowl.se/blood-bowl.se/httpd.www/Themes/footballmulticolor/index.template.php
Line: 199

Arantor

Please can you attach that file mentioned - footballmulticolor/index.template.php as an attachment to your next post?

Sramota

Ofcourse.

Do note that due to the theme being unable to handle the SMF portal I have been fiddling with the theme a bit so it's obviously my fault here.

Arantor

The first error is:
<td class="sub_nav"><a href="', $scripturl, '?action=forum">' , $txt[forum] ='Forum' , '</a></td>';

Firstly, it should be $txt['forum'], and secondly $txt['forum'] should have been declared in the language files in Themes/default/languages.

As for the others, same sort of deal; they're supposed to be in your theme's language files but aren't. Check out Themes/default/languages/Modifications.english.php to see if $txt['theme_color'] and $txt['theme_change'] are declared there.

Sramota

The quickly rid me of all four,
thank you :)

HOWEVER!

8: Undefined index: session_var
File: /customers/blood-bowl.se/blood-bowl.se/httpd.www/Themes/default/PortalShoutbox.template.php
Line: 111

now pops up instead...

File attached.

Arantor

Please can you quote line 111 of that file?

Sramota

Ofcourse!

<input type="text" name="new_shout" id="new_shout_', $shoutbox['id'], '" class="shoutbox_input"', $context['browser']['is_ie'] ? ' onkeypress="if (sp_catch_enter(event)) { sp_submit_shout(' . $shoutbox['id'] . ', \'' . $context['session_var'] . '\', \'' . $context['session_id'] . '\'); return false; }"' : '', ' />

Arantor

This is actually an SP bug.

Try this:

<input type="text" name="new_shout" id="new_shout_', $shoutbox['id'], '" class="shoutbox_input"', $context['browser']['is_ie'] ? ' onkeypress="if (sp_catch_enter(event)) { sp_submit_shout(' . $shoutbox['id'] . ', \'sesc\', \'' . $context['session_id'] . '\'); return false; }"' : '', ' />

Sramota

That sorted it all out.

Thank you kindly sir,
you truly are an Online Super Hero

Advertisement: