TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 319
  • Total: 319

TinyPortal v1.0.5 beta

Started by alex777, April 20, 2008, 04:54:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alex777

Hi, I've just installed TinyPortal v1.0.5 and it works fine so far. Just have one small problem...in the error log file I got the following message:

8: Undefined index: 0
Datei: /srv/www/xxx/xxx/Sources/TPortal.php
Line: 1574

I just understand that there must be something in the TPortal.php on line 1574...

Does anybody know what to do?

IchBin

See if you can narrow down when you are getting the error. Since we can't reproduce it, its going to take some work on your part. One window on your error log, and another on your site. Click through your site and check the error log. See if you can narrow down when the error is appearing and on which pages.

alex777

#2
This error appears all the time when I go to the frontpage.

In the TPortal.php on line 1574 I have the following code:

$context['TPortal']['current_category']=$context['TPortal']['catnames'][$row['category']];


Code from line 1510-1575

// If we're always html resizing, assume it's too large.
if ($modSettings['avatar_action_too_large'] == 'option_html_resize' || $modSettings['avatar_action_too_large'] == 'option_js_resize')
{
$avatar_width = !empty($modSettings['avatar_max_width_external']) ? ' width="' . $modSettings['avatar_max_width_external'] . '"' : '';
$avatar_height = !empty($modSettings['avatar_max_height_external']) ? ' height="' . $modSettings['avatar_max_height_external'] . '"' : '';
}
else
{
$avatar_width = '';
$avatar_height = '';
}

$bt[] = array(
'id' => $row['id'],
'icon' => '',
'pos' => $row['parse'],
'subject' => $row['subject'],
'time' => timeformat($row['date']),
'timestamp' => tp_forum_time(true,$row['date']),
'body' => $row['useintro']==-2 ? parse_bbc($row['body']) : $row['body'],
'href' => '' . $scripturl . '?page='.$row['shortname'],
'print_href' => $scripturl . '?page='.$row['shortname'].';print',
'link' => '',
'replies' => '',
'new_comment' => '',
'poster' => array(
'id' => $row['authorID'],
'name' => $row['realName'],
'href' => !empty($row['authorID']) ? '' . $scripturl . '?action=profile;u=' . $row['authorID'] : '',
'link' => !empty($row['authorID']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['authorID'] . '">' . $row['realName'] . '</a>' : $row['realName']
),
'is_last' => false,
'is_php' => $phplink=='-1' ? true: false,
'is_bbc' => $phplink=='-2' ? true: false,
'is_import' => $phplink=='-3' ? true: false,
'is_boardnews' => false,
'options' => $aoptions,
'is_featured' => true,
'frame' => $row['frame'],
'category' => !empty($context['TPortal']['caticons'][$row['category']]) ? '<a href="' . $scripturl . '?cat=' . $row['category'] . '"><img src="' . $boardurl . '/tp-files/tp-articles/icons/' . $context['TPortal']['caticons'][$row['category']] . '" alt="' . $context['TPortal']['catnames'][$row['category']] . '" align="left" style="border: 0; margin: 0.5ex 2ex 1ex 1ex;" /></a>' : '' ,
'catlink' => !empty($context['TPortal']['catnames'][$row['category']]) ? '<a href="' . $scripturl . '?cat=' . $row['category'] . '">' . $context['TPortal']['catnames'][$row['category']]. '</a>' : '' ,
'use_intro' => $row['useintro']==1 ? true : false ,
'introtext' => html_entity_decode($row['intro']),
'ID_CAT' => $row['category'],
'comments' => $row['comments'],
'comments_var' => $row['comments_var'],
'views' => $row['views'],
'rating_votes' => $rating_votes,
'rating_average' => $rating_average,
'can_rate' => (in_array($context['user']['id'],explode(",",$row['voters'])) && $context['user']['is_logged']) ? '0' : '1' ,
'featured' => true,
'avatar' => array(
'name' => &$row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'sticky' => $row['sticky'],
'lock' => $row['locked'],
'fileimport' => $row['fileimport'],
'topic' => $row['topic'],
'illustration' => $row['illustration'],
);
$current_comments=$row['comments'];
$context['TPortal']['current_category']=$context['TPortal']['catnames'][$row['category']];
$context['page_title'] = $row['subject'];

dkillers

i think there is problem with your theme

alex777

#4
I don't think that's a problem with the theme...I use a TP-Theme from DzinerStudio and also when I change the theme to the default theme the error still appears. The only thing which may could be a problem is that the tp-theme was made for tiny portal 0.983.....I somewhere read that such themes are not needed anymore for the new tinyportal and that just a link to the frontpage has to be added to ordinary themes...I didn't had to do this because my old tp-theme still works fine.

According the error log file it must have to do with the TPortal.php in the source file....line 1574

IchBin

The error isn't always the file it says it is. If the error only appears on the frontpage you should try some different things on your frontpage to see if you can narrow down what it is on your frontpage that causes it.

alex777

#6
Okay, now I think I know where the problem is.....when I go in the admin section to "Tiny Portal" and then to "Settings and Frontpage"  to "Tiny Portal - Frontpage Settings" and there activate "only forum-posts" this problem with the errors in the error log file appears.

But when I for example just activate "Front page blocks" as it was before (also with the old tp version) I do not get error messages at all.

So I think it must have something to do with the forum-posts I'd like to have on the frontpage.

IchBin

Good work. If you'd like you can file the bug report. I'm busy on a couple of other things here for the next bit, so you can do it if you'd like. There's a bugtracker link up top if you're using the sites default theme bz15.

This website is proudly hosted on Crocweb Cloud Website Hosting.