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,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 515
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 439
  • Total: 439

Error: Undefined index: smf_news_3

Started by morskisrle, October 29, 2007, 01:26:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

morskisrle

In the error log i just keep getting these error logs while on the forums eveything seems fine..
Undefined index: smf_news_3 and
Undefined index: smf_news_2
in
/home/www/smf/Sources/TPortal.php

and it keeps giving me the lines 1796-1799
I'm using 0.9.8 version with new def TP theme.

The code begins et line 1796 and ends at 1799
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['numReplies'] . ' ' . ($row['numReplies'] == 1 ? $txt['smf_news_1'] : $txt['smf_news_2']) . '</a>',
'replies' => $row['numReplies'],
'comment_href' => !empty($row['locked']) ? '' : $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . ';num_replies=' . $row['numReplies'],
'comment_link' => !empty($row['locked']) ? '' : '<a href="' . $scripturl .


What can be the problem?



IchBin

You should see these 3 lines in your stats.*language*.php file.
$txt['smf_news_1'] = 'comment';
$txt['smf_news_2'] = 'comments';
$txt['smf_news_3'] = 'Write Comment';

morskisrle


IchBin

The theme you are using, does it contain a stat.language file? Do these errors only happen in a certain theme? Do they happen in the default theme?

morskisrle

No the custom theme does not have it's own stat.language file, it doesn;t even have it's own source directory...i'll try to copy the stat file to it and see if it's ok...

morskisrle

and it doesn't have it's own language directory too..

morskisrle

Ok..I made it;s own languages directory and copied the stats.languafe file in it and it doesn't seem to give any errors. But i ned to go to work and look later if i get some

Offtopic
Is it preferable to have all the neccesary files in the each theme directory rather than having them only in default?
My custom theme has only the custom modified files and the rest sits in the default one.

IchBin

Its not necessary. If you're theme does not have the file, it will automatically use the files that are in the default theme.

This website is proudly hosted on Crocweb Cloud Website Hosting.