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

Recent

Welcome to TinyPortal. Please login or sign up.

March 28, 2024, 09:17:15 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,104
  • Total Topics: 21,212
  • Online today: 212
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 91
  • Total: 91

Error in /Sources/TPortal.php

Started by Nefeli, August 20, 2007, 12:25:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nefeli

The last weeks, in my Forum Error Log i take errors like this:
8: Undefined index: 52
File:...... /Sources/TPortal.php
Line: 840


The number of line of report varies from 839-842.

the code in the file is:
// do the category have any parents?
$parents=array();
$parents[]=array(
'id' => $mycat,
'name' => $context['TPortal']['categories'][$mycat]['name'],
'shortname' => $context['TPortal']['categories'][$
mycat]['shortname'],
);
if($context['TPortal']['categories'][$mycat]['parent']>0){
$ca=$mycat;
$parents=array();
while($ca>0){
$parents[]=array(
'id' => $ca,
'name' => $context['TPortal']['categories'][$ca]['name'],
'shortname' => $context['TPortal']['categories'][$ca]['shortname'],
);
$parent=$context['TPortal']['categories'][$ca]['parent'];
$ca=$parent;
}
}


Lines 839-842 are:
'name' => $context['TPortal']['categories'][$ca]['name'],
                  'shortname' => $context['TPortal']['categories'][$ca]['shortname'],
               );
               $parent=$context['TPortal']['categories'][$ca]['parent'];


I look for relatives strings on: TPportal.greek.php, TPortal.english.php, index.greek.php and index.english.php but i didn't find anything about.

An idea perhaps? :-\

G6Cad

That file that generate the errors can generate errors from other mods to.
What other mods do you have installed to your forum ?

Nefeli

I combined this error report with a other error for Custom Profile Field Mod v.3.16.
It searched string in file CustomProfile.greek.php that I had not upload until today!!!
I add the file and the errors disappear!!!
Maybe I have corrected the dysfunction but I am not so sure.
Thank you very much for your time and your interest for my problem.
If the error come back, that will mean that I did not correct it. Then I will report here, again  :coolsmiley:.
Thanks again.

Nefeli

Finaly I found the error and I corrected it.
This time I am 1000% certain! However it deserves that I report it here. Perhaps it is a bug of the application.

Neither mod it was the cause neither text string.

For some reason, Tiny created a category of articles ghost.
Number 52 was reported in the number of category of articles.
The category existed and also the articles inside. Anyone could read them, but it had not been registered in the list of categories!

In picture 1 you see the admin tab of the management of Articles. It exists and function well.

In picture 2 however (before the correction) the category does not appear nowhere!

I add a category clone with the same name and the result you see in picture 3.

Two times the same report. For certain unknown reasons, Tiny recognized the category partially as real!
For the completion solution's report I must say that I transported the articles in the new category (clone) in order to solve definitely the problem.

And a last observation: The old categoryââ,¬Â¦ can't delete! In the list of categories I see only the clone. Not old one. Must I will correct the database.

(Sorry for my poor English) :o