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,947
  • Latest: sgm09
Stats
  • Total Posts: 195,787
  • Total Topics: 21,281
  • Online today: 67
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 60
  • Total: 60

[bugtracker] Error message in log file when using "only forum-posts for frontpage

Started by alex777, April 21, 2008, 12:57:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alex777

Link to the topic:
http://www.tinyportal.net/index.php?topic=23458.0

I just installed the new tinyportal v.1.0.5 beta, almost everything works fine but 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" I will get a error message in the error log file everytime after visiting the frontpage.

I get the following error message:
Undefined index: 0
Datei: /srv/www/xxx/xxx/Sources/TPortal.php
Line: 1574

Thats the code in the TPortal.php on line 1574
$context['TPortal']['current_category']=$context['TPortal']['catnames'][$row['category']];

The problem only appears when I have "only forum-post" activated for the frontpage. When I have activated "front page blocks" I do not get an error message.

The thing is that I'd like the "only forum-posts" option...but without this bug.

raid

I am having the same error, forum post me too and the same Code on Source file


Using SMF 1.1.5 with last dilbermc (not the one for TP 0.9.8.3)
SMF 2.0 + TP RC2

An_Old_Girl

I am getting the same error message except that I have "only articles" selected for the Front page...

bloc

How many article categories do each of you have?

An_Old_Girl

#4
Hi Bloc!  :)
I have only one article category, but the article I have chosen to display on the front page is not assigned to any category.

I am only getting this error on the Front Page. When I go to the forum or other areas, the error is not present.

Here is what I see:

Quotehttp://mysite.com/SMF Installation directory/index.php
Apply Filter: Only show the errors with the same message
8: Undefined index: 0
File: /home/content/m/a/1/myserverusername/html/SMF Installation directory/Sources/TPortal.php
Line: 1574

If you need to see what's around Line 1574...
if($context['TPortal']['use_wysiwyg']>0)

$context['TPortal']['allow_wysiwyg']=true;

else

$context['TPortal']['allow_wysiwyg']=false;



if(isset($context['TPortal']['usersettings']['wysiwyg'])){

// if its 0 the no-one can choose it

if($context['TPortal']['use_wysiwyg']=='0')

$context['TPortal']['usersettings']['wysiwyg']='0';



// check that we are not in admin section

if((isset($_GET['action']) && $_GET['action']=='tpadmin') && ((isset($_GET['sa']) && $_GET['sa']=='settings') || !isset($_GET['sa'])))

$in_admin=true;

if(!isset($in_admin))

$context['TPortal']['use_wysiwyg']=$context['TPortal']['usersettings']['wysiwyg'];


I was investigating some problem with the FCKeditor & wysiwyg editor when my brain overloaded and I came here hoping for salvation.  :buck2:

I am unable to select the FCK editor. After I select it and save, it reverts to the "yes, WhizzyWig" setting... just in case this has something to do with it...

bloc

They should not be related.

About the categories and article without category, that helps. :)

An_Old_Girl

After I realized that the article on the Front Page was uncategorized, I made a new category and assigned it - no change in the error... :-\

bloc

It seems there are a error with not checking if the variable exists on that line.

try exchange line 1574

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


with

$context['TPortal']['current_category'] = isset($context['TPortal']['catnames'][$row['category']]) ? $context['TPortal']['catnames'][$row['category']] : '-no name-';



This website is proudly hosted on Crocweb Cloud Website Hosting.