TinyPortal
Development => Support => Topic started by: leftezi on November 02, 2016, 12:29:27 AM
SMF version: SMF 2.0.12
TP version: TP 1.2
Default Forum Language: Greek UTF8
Theme name and version: Curve (Default)
Related Error messages:
....index.php?action=dlattach;attach=7959;type=avatar
8: Undefined index: forum_name
File: ...Themes/default/languages/TPortal.english.php
Line: 305
line 305 is:
==>305: $txt['whoall_forum'] = 'Viewing the board index of <a href="' . $scripturl . '">' . $context['forum_name'] . '[/url].';
and
..../index.php?action=dlattach;attach=9716;type=avatar
8: Undefined index: forum_name
File: ...Themes/default/languages/TPortal.greek-utf8.php
Line: 291
line 291 is:
==>291:$txt['whoall_forum'] = 'Εμφάνιση του καταλόγου του φόρουμ του <a href="' . $scripturl . '">' . $context['forum_name'] . '[/url].';
There are thousands of this errors
this has been reported a few times and the only real fix we have found is to move avatars out of the attachments folder. it will solve the issue and may help with performance on your forum. it is not an ideal fix but SMF 2.1 is going this way moving forward anyway. http://www.simplemachines.org/community/index.php?topic=197938.0
I would think putting a small logic in there might help with the error. Have you guys tried exchanging:
$txt['whoall_forum'] = 'Viewing the board index of <a href="' . $scripturl . '">' . $context['forum_name'] . '</a>.';
with:
$txt['whoall_forum'] = 'Viewing the board index of <a href="' . $scripturl . '">' . (!empty($context['forum_name']) ? $context['forum_name'] : '*') . '</a>.';
that does seem to resolve the error, but i wonder what is causing it in the first place and why not everyone that has the $context['forum_name'] defined has this error.
Well, the attach/download routine of avatars skips quite abit of code normally introduced in other actions. $context['forum_name'] probably never gets set...or at least not in every scenario.
Sorry for my late answer. Although i have notifications turned on for the topic, i received no email notification.
Thank you all for your time and special thanks to Bloc. O0
The solution with the code was easier for me. I replaced the code and now i have no errors.