When reading the following, keep in mind, I am learning to code and this is my first smf forum. I have not adjusted anything other than the sub.php for submenu tabs. Thank you for taking the time to help me out.
I am running SMF 2.02 with mods; SMF Gallery Lite and Simple Portal. I upgraded the site, from 1.14 to 2.02, following directions and without any problems. However, 24 hours later when I checked the error log on the site, all new posts are generating several errors per action.
For example the following errors are repeated time and time again:
8: Undefined index:
titleFile: /html/Themes/default/Display.template.php (body_above sub template - eval?)
Line: 317
which corresponds to
if (!empty($message['member']['custom_fields']))
and
8: Undefined index:
titleFile: /html/Themes/default/MessageIndex.template.php (body_above sub template - eval?)
Line: 317
which corresponds to
echo '
So questions
#1) what do these errors mean? and question
#2)How does a problem happen in the default theme if nothing in that PHP has ever been modified? and
#3) How should I fix them?
Admin -> Server Settings -> Disable evaluation of templates
Then post any new error messages without eval in them
Thank you so much for responding :)
new error is
8: Undefined index
title File: /html/Themes/silentwave_20/index.template.php
Line: 317
Which corresponds to
<a class="', $button['active_button'] ? 'active' : '', '" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '><span>', $button['title'], '</span></a>';
and if people are using the default smf theme the same error is generated as
8: Undefined index: href
File: /html/Themes/default/index.template.php
Line: 421
and
Undefined index:
titleFile: /html/Themes/default/index.template.php
Line: 422
which corresponds to
evel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
AND
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>
Please attach Themes/silentwave_20/index.template.php file to your next post
I think that's actually a bit of a bug if one removes a menu item.
See if this fixes it. In Subs.php look for:
$context['menu_buttons'][$current_action]['active_button'] = true;
And change it to:
if (isset($context['menu_buttons'][$current_action]))
$context['menu_buttons'][$current_action]['active_button'] = true;
BTW, have you removed a menu button?
QuoteBTW, have you removed a menu button?
Yes, I removed the calendar and gallery buttons because they are sub tabs in another menu tab. I'll try that fix and if that doesn't work, I will attach the file as requested. Thanks again for your help :)
Oh thanks so much guys! Replacing that code worked like a charm. No more errors reported! Solved :D