TinyPortal

Development => Support => Topic started by: Rus on September 24, 2007, 02:43:14 AM

Title: Undefined index: 6
Post by: Rus on September 24, 2007, 02:43:14 AM
I have been getting this error in my log whenever someone visits one particular article.

Any ideas?

8: Undefined index: 6
File: /home/XXXXX/public_html/Sources/TPortal.php
Line: 917
Title: Re: Undefined index: 6
Post by: JPDeni on September 24, 2007, 03:33:16 AM
Is it a php article? If so, you'll need to post the code.
Title: Re: Undefined index: 6
Post by: Rus on September 24, 2007, 03:45:56 AM
Nope, straight article, copied text from Word probly and dumped it in and then added a pic with the left align.
Title: Re: Undefined index: 6
Post by: G6Cad on September 24, 2007, 07:38:35 AM
Post the code with in codetags and explain what settings you have for the article.
Title: Re: Undefined index: 6
Post by: Rus on September 24, 2007, 04:18:16 PM
There is no code that I know of, its just the featured article, not a PHP article, use intro and the intro has a thumbnail of the image also using left align.

Use frame from theme, and these options checked:

Show date
Show title
Show author
Show linktree
Show top
Show centerblocks
Show rightblocks
Show leftblocks
Show number of views
Show ratings
Allow to rate?
Title: Re: Undefined index: 6
Post by: feline on September 24, 2007, 06:56:34 PM
I think, the problem is this line:

if($row['category']>0 && $context['TPortal']['categories'][$row['category']]['parent']>0){


if not category parent exist or the result is NULL, this gives the error.
you can test this:

if(isset($context['TPortal']['categories'][$row['category']]['parent']) && $row['category']>0 && $context['TPortal']['categories'][$row['category']]['parent']>0){


Fel
Title: Re: Undefined index: 6
Post by: Rus on September 24, 2007, 07:03:58 PM
Thanks,

Seeing as how I'm still a bit new, which file would I be looking for that in?

Edit - Based on what you said, I put that article into a category, it had none before, and the error went away.
Title: Re: Undefined index: 6
Post by: feline on September 24, 2007, 07:19:17 PM
Quote from: Rus on September 24, 2007, 07:03:58 PM
Seeing as how I'm still a bit new, which file would I be looking for that in?
in TPortal.php line 917 ..  ::)

Fel