Getting tons of these
8: Undefined index: Downloads
File: /Themes/TP_helios_multi11_rc2/TPortal.template.php (eval?)
Line: 543
Do you have any files in the download manager?
Yes, one.
Can anyone help?
Please
Which theme and SMF version? And what language?
SMF 1.1rc2
TP Helios rc2
English
Try to rename TPortal.template inside Helios folder, erase error log and see if the error still show up. If it doesn't its the Tportal.template file thats wrong.
What would I rename it?
It is also making this error in all themes.
Quote from: Bloc on March 10, 2006, 06:42:05 PM
Try to rename TPortal.template inside Helios folder, erase error log and see if the error still show up. If it doesn't its the Tportal.template file thats wrong.
Anything - try TPortal.template9.php
What you're trying to do is isolate the file. If it is renamed, then TP won't read it. If it is not being read and the error does away, then you know the problem is in the file.
Duh. *Slaps self on forehead*
Done that and still getting the errors.
Anymore ideas?
None here. I've given up trying to troubleshoot everything the error logs mentions.
My 2ÂÃ,¢ worth is that as long as the error isn't showing itself in the operation of your site, then don't worry about it right now. You do want to be mindful that these errors do take their toll on the performance of your site, though.
I've heard that there are numerous errors in logs due to issues in the RC2 code, and they should be fixed in the final version. Conflicts from these errors might be causing other errors.
But you're not alone - with straight SMF, I see a dramatically higher number of errors on the server level, compared to other scripts - the ones showing in the admin panel are just part of the issue. Toss in TP and the errors increase, but nearly all of the increases have to do with the SMF core and not TP.
This might a issue with the check for Download section...do you use a "downloads" button in your main buttons of Helios?
Yes
Its probably the check there that is wrong.
If you do not have this check right before the "downloads" button, then replace what you have with this code(which is the correct one):
if($context['TPortal']['show_download']=='1')
Didn't do it. These are also shoing up in the default.
8: Undefined index: Downloads
File: /public_html/Themes/TP_helios_multi11_rc2/TPortal.template.php (eval?)
Line: 551
8: Undefined index: Downloads
File: /public_html/Themes/TP_helios_multi11_rc2/BoardIndex.template.php (eval?)
Line: 551
8: Undefined index: Downloads
File: /public_html/Themes/TP_helios_multi11_rc2/Display.template.php (eval?)
Line: 551
8: Undefined index: Downloads
File: /home/legends/public_html/Themes/default/Errors.template.php (eval?)
Line: 551
8: Undefined index: Downloads
File: /home/legends/public_html/Themes/TP_helios_multi11_rc2/MessageIndex.template.php (eval?)
Line: 551
I am also having the same eror with the arcade.
8: Undefined index: Arcade
File: /public_html/Themes/TP_helios_multi11_rc2/TPortal.template.php (eval?)
Line: 548
..could you post the entire template_menu() function you have now , from default or Helios theme?
Default:
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin', 'arcade', 'downloads')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if (isset($_GET['dl']))
$current_action = 'dlmanager';
if (isset($_GET['board']) || isset($_GET['topic']))
$current_action = 'forum';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}
// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '"> </td>';
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action=='forum' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=forum">FORUM</a>
</td>' , $current_action=='forum' ? '<td class="maintab_active_last"> </td>' : '';
// The [arcade]!
if ($context['allow_arcade'])
echo ($current_action == 'arcade' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'arcade' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=arcade">' , $txt['permissiongroup_arcade'] , '</a>
</td>' , $current_action == 'arcade' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Show the [downloads] button.
if($context['TPortal']['show_download']=='1')
echo ($current_action=='downloads' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'downloads' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tpmod;dl=0">Downloads</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
</td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'admin' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
</td>' , $current_action == 'admin' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
</td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
</td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// The end of tab section.
echo '
<td class="maintab_' , $last , '"> </td>
</tr>
</table>';
}
Helios:
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// Show the [home] and [help] buttons.
echo '<td><a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 0px 0;" border="0" />' : $txt[103]), '</a></td>';
echo '<td><a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="Forum" style="margin: 0px 0;" border="0" />' : 'Forum'), '</a></td>';
echo '<td><a href="', $scripturl, '?action=arcade">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/helios_arcade.gif" alt="' . $txt['Arcade'] . '" style="margin: 0px 0;" border="0" />' : $txt['Arcade']), '</a></td>';
if($context['TPortal']['show_download']=='1')
echo '<td><a href="', $scripturl, '?action=tpmod;dl=0">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/helios_downloads.gif" alt="' . $txt['Downloads'] . '" style="margin: 0px 0;" border="0" />' : $txt['Downloads']), '</a></td>';
echo '<td><a href="', $scripturl, '?action=help" >', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 0px 0;" border="0" />' : $txt[119]), '</a></td>';
// How about the [search] button?
if ($context['allow_search'])
echo '<td><a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 0px 0;" border="0" />' : $txt[182]), '</a></td>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin']){
echo '<td><a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin: 0px 0;" border="0" />' : $txt[2]), '</a></td>';
}
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<td><a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 0px 0;" border="0" />' : $txt[467]), '</a></td>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<td><a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 0px 0;" border="0" />' : $txt['calendar24']), '</a></td>';
// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '<td><a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" style="margin: 0px 0;" border="0" />' : $txt[34]), '</a></td>';
echo '<td><a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" style="margin: 0px 0;" border="0" />' : $txt[97]), '</a></td>';
}
// Otherwise, they might want to [logout]...
else{
echo '<td><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 0px 0;" border="0" />' : $txt[108]), '</a></td>';
}
// first button...is it on?
if(isset($settings['custombutton1_use']) && $settings['custombutton1_use']==true){
// is it memberonly?
if(isset($settings['custombutton1_member']) && $settings['custombutton1_member']==true){
// it is, check if guest
if($context['user']['is_logged']){
// member, check if its not empty...
if(isset($settings['custombutton1']) && !empty($settings['custombutton1']) && isset($settings['custombutton1_link']) && !empty($settings['custombutton1_link']))
echo '<td><a href="'. $settings['custombutton1_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton1'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
}
}
else{
// guests too, check if its not empty...
if(isset($settings['custombutton1']) && !empty($settings['custombutton1']) && isset($settings['custombutton1_link']) && !empty($settings['custombutton1_link']))
echo '<td><a href="'. $settings['custombutton1_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton1'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
}
}
// second button...is it on?
if(isset($settings['custombutton2_use']) && $settings['custombutton2_use']==true){
// is it memberonly?
if(isset($settings['custombutton2_member']) && $settings['custombutton2_member']==true){
// it is, check if guest
if($context['user']['is_logged']){
// member, check if its not empty...
if(isset($settings['custombutton2']) && !empty($settings['custombutton2']) && isset($settings['custombutton2_link']) && !empty($settings['custombutton2_link']))
echo '<td><a href="'. $settings['custombutton2_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton2'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
}
}
else{
// guests too, check if its not empty...
if(isset($settings['custombutton2']) && !empty($settings['custombutton2']) && isset($settings['custombutton2_link']) && !empty($settings['custombutton2_link']))
echo '<td><a href="'. $settings['custombutton2_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton2'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
}
}
// third button...is it on?
if(isset($settings['custombutton3_use']) && $settings['custombutton3_use']==true){
// is it memberonly?
if(isset($settings['custombutton3_member']) && $settings['custombutton3_member']==true){
// it is, check if guest
if($context['user']['is_logged']){
// member, check if its not empty...
if(isset($settings['custombutton3']) && !empty($settings['custombutton3']) && isset($settings['custombutton3_link']) && !empty($settings['custombutton3_link']))
echo '<td><a href="'. $settings['custombutton3_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton3'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
}
}
else{
// guests too, check if its not empty...
if(isset($settings['custombutton3']) && !empty($settings['custombutton3']) && isset($settings['custombutton3_link']) && !empty($settings['custombutton3_link']))
echo '<td><a href="'. $settings['custombutton3_link'].'"><img src="' . $settings['images_url'] . '/' . $settings['custombutton3'] . '" alt="" style="margin: 0px 0;" border="0" /></a></td>';
}
}
echo '<td><img src="' . $settings['images_url'] . '/pod/'.$options['theme_color'].'/pod-rightbar.gif" alt="gfx" style="margin: 0px 0;" border="0" />';
}
Ah, i see it. In default theme this code:
if (isset($_GET['dl']))
$current_action = 'dlmanager';
needs to be
if (isset($_GET['dl']))
$current_action = 'downloads';
This is a bug I need to correct in the TP package as well, but let me know if it works or not. :)
Still getting errors.
Could it be a language problem?
*smacks head*
Of course. This:
alt="' . $txt['Downloads'] . '"
needs to be
alt="Downloads" or simply your preferred word.
That was it!
Thank you so much for taking the time to figure this out. I was getting thousands of pages of these errors everyday.
I was going to say something Bloc, but knowing that your PHP knowledge is far greater than mine I thought you were on to something that I didn't know anything about. lol
I have the same problem as Jay! cant find the file needed to edit - can someone help please?
index.template.php of the theme you are using
Cannot find alt="' . $txt['Downloads'] . in any part of that file G6. ???
Also, is the smiley set available for download that you are using here?
/forum/themes/default/languages/english/TPortal.english.php
Sorry about giving you the wrong file, should have read it better from the start. I was in the impression that you were in the template and looked for something, what ever gave me that idea i dont know :uglystupid2:
;D Thanks G6 but can't find the engilish directory. Found the file in /forum/Themes/default/languages/ but there was no $txt['Downloads'] in this file either :-\ :smiley6600:
I think you have some missing files in your installation then. Try to upload the package manually and that way see if the files show up, some times the files dont uploads correctly.
But firts you can try this file and put it in your themes/languages/
You should have three tp files in that directory.
extract the zip and upload the files to your themes/default/english/ folder