Fehlermeldung in der viewonline.php

Mod Support

Moderators: BNa, Sekuro, 4seven

Re: Fehlermeldung in der viewonline.php

Postby Tim » 30 Jan 2013, 19:53

Hey 4seven, ich habe leider mit dem neuen Code jetzt wieder eine Fehlermeldung bekommen.
Diese Fehlermeldung gibt er aber nur im Debugmodus aus, den ich bis eben aktiv hatte.

Den Fehler, dass manchmal dort steht
Beantwortet Thema "" in ForumX
habe ich schon bemerkt,
aber erst durch den Debugmodus erscheint dabei auch eine Fehlermeldung, dadurch wurde mir erst klar,
dass es ein richtiger Fehler ist.
Der Fehler, der ausgegeben wird, ist dieser:
[phpBB Debug] PHP Notice: in file [ROOT]/viewonline.php on line 366: Undefined offset: 1
[phpBB Debug] PHP Notice: in file [ROOT]/viewonline.php on line 366: Undefined index:
[phpBB Debug] PHP Notice: in file [ROOT]/viewonline.php on line 366: Undefined index:
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4820: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4822: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4823: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4824: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)


Hier der Screenshot dazu: http://img5.fotos-hochladen.net/uploads ... jao3r7.png
Die Zeile 366 in der viewonline.php ist diese:
Code: Select all
                                    $location sprintf($user->lang['REPLYING_MESSAGE_TOPIC'], $forum_data[$forum_id]['forum_name'], $topic_titles[$topic_post_ids[$on_page[1]]]); 

und gehört zu dem Codeblock der Topic in who is online:
Code: Select all
// BEGIN: Topic in "Who is online"
                                
if ($auth->acl_get('a_')){
                                
preg_match('#t=([0-9]+)#'$row['session_page'], $on_page);
                                
preg_match('#p=([0-9]+)#'$row['session_page'], $on_page_p);
                                if (
sizeof($on_page) && isset($topic_titles[$on_page[1]]))
                                {
                                    
$location sprintf($user->lang['REPLYING_MESSAGE_TOPIC'], $forum_data[$forum_id]['forum_name'], $topic_titles[$on_page[1]]);
                                    
$location_url append_sid("{$phpbb_root_path}viewtopic.$phpEx"'f=' $forum_id '&t=' $on_page[1]);
                                }
                                else if (
sizeof($on_page_p) && isset($topic_post_ids[$on_page_p[1]]))
                                {
                                    
$location sprintf($user->lang['REPLYING_MESSAGE_TOPIC'], $forum_data[$forum_id]['forum_name'], $topic_titles[$topic_post_ids[$on_page[1]]]);
                                    
$location_url append_sid("{$phpbb_root_path}viewtopic.$phpEx"'f=' $forum_id '&p=' $on_page_p[1]);
                                }
                                else
                                {
                                    
$location sprintf($user->lang['REPLYING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
                                }
                                }
                                else{
                                
$location sprintf($user->lang['REPLYING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
                                }
                                
// END: Topic in "Who is online" 
Tim

Tiptop

Tiptop
 
Posts: 68
Joined: 13 Nov 2009, 23:08
 
Resolution: 1280x1024


Re: Fehlermeldung in der viewonline.php

Postby 4seven » 30 Jan 2013, 21:46

Das ist aber kein Fehler meines Mods, den 'vergangenen' Fehler habe ich nämlich sicher ausgeschlossen.
Es ist ein Fehler im Topic in "Who is online" Mod, der zwar selten auftritt aber bekannt ist ;)

Code: Select all
// BEGIN: Topic in "Who is online"
// code code code
// END: Topic in "Who is online"          

Ich such mal nach der Lösung, ich hatte das nämlich im Original Topic des Autors schon damals gelöst.

Hier isse schon:

Finde

Code: Select all
$location = sprintf($user->lang['REPLYING_MESSAGE_TOPIC'], $forum_data[$forum_id]['forum_name'], $topic_titles[$topic_post_ids[$on_page[1]]]);

Ersetze mit

Code: Select all
$location = sprintf($user->lang['REPLYING_MESSAGE_TOPIC'], isset($forum_data[$forum_id]['forum_name']) ? $forum_data[$forum_id]['forum_name'] : false, isset($topic_titles[$topic_post_ids[$on_page[1]]]) ? $topic_titles[$topic_post_ids[$on_page[1]]] : false);
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4seven

Tiptop

Tiptop
 
Posts: 318
Joined: 20 Jun 2012, 16:55
 
Resolution: 1920x1080


Re: Fehlermeldung in der viewonline.php

Postby Tim » 30 Jan 2013, 22:01

Ah ja, da hatte ich die Mods durcheinander gebracht, sorry. :roll:
Vielen Dank für die super Hilfe, echt top! :!:

Edit:
Das gibt leider eine neue Fehlermeldung aus.

Code: Select all
[phpBB DebugPHP Noticein file [ROOT]/viewonline.php on line 361Undefined index621
[phpBB DebugPHP Warningin file [ROOT]/includes/functions.php on line 4820Cannot modify header information headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[
phpBB DebugPHP Warningin file [ROOT]/includes/functions.php on line 4822Cannot modify header information headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[
phpBB DebugPHP Warningin file [ROOT]/includes/functions.php on line 4823Cannot modify header information headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[
phpBB DebugPHP Warningin file [ROOT]/includes/functions.php on line 4824Cannot modify header information headers already sent by (output started at [ROOT]/includes/functions.php:3848
Tim

Tiptop

Tiptop
 
Posts: 68
Joined: 13 Nov 2009, 23:08
 
Resolution: 1280x1024


Re: Fehlermeldung in der viewonline.php

Postby 4seven » 30 Jan 2013, 22:12

Dann mal bitte die Zeile 361 posten

Code: Select all
[phpBB Debug] PHP Notice: in file [ROOT]/viewonline.php on line 361:

Ich wusste das da noch was war. Gab wohl damals auch Folgefehler, da der Mod nicht ganz durchdacht ist.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4seven

Tiptop

Tiptop
 
Posts: 318
Joined: 20 Jun 2012, 16:55
 
Resolution: 1920x1080


Re: Fehlermeldung in der viewonline.php

Postby Tim » 30 Jan 2013, 22:13

361 ist diese:
Code: Select all
                                    $location sprintf($user->lang['REPLYING_MESSAGE_TOPIC'], isset($forum_data[$forum_id]['forum_name']) ? $forum_data[$forum_id]['forum_name'] : false, isset($topic_titles[$topic_post_ids[$on_page[1]]]) ? $topic_titles[$topic_post_ids[$on_page[1]]] : false); 
Tim

Tiptop

Tiptop
 
Posts: 68
Joined: 13 Nov 2009, 23:08
 
Resolution: 1280x1024


Re: Fehlermeldung in der viewonline.php

Postby 4seven » 30 Jan 2013, 22:16

Versuch mal

Code: Select all
$location = sprintf($user->lang['REPLYING_MESSAGE_TOPIC'], isset($forum_data[$forum_id]) ? $forum_data[$forum_id]['forum_name'] : false, isset($topic_titles[$topic_post_ids[$on_page[1]]]) ? $topic_titles[$topic_post_ids[$on_page[1]]] : false);

oder

Code: Select all
$location sprintf($user->lang['REPLYING_MESSAGE_TOPIC'], isset($forum_data[$forum_id]['forum_name']) ? $forum_data[$forum_id]['forum_name'] : false, isset($topic_titles[$topic_post_ids]) ? $topic_titles[$topic_post_ids[$on_page[1]]] : false);  

statt

Code: Select all
$location sprintf($user->lang['REPLYING_MESSAGE_TOPIC'], isset($forum_data[$forum_id]['forum_name']) ? $forum_data[$forum_id]['forum_name'] : false, isset($topic_titles[$topic_post_ids[$on_page[1]]]) ? $topic_titles[$topic_post_ids[$on_page[1]]] : false);  
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4seven

Tiptop

Tiptop
 
Posts: 318
Joined: 20 Jun 2012, 16:55
 
Resolution: 1920x1080


Re: Fehlermeldung in der viewonline.php

Postby Tim » 30 Jan 2013, 22:23

Mit dem ersten Code habe ich, zumindest im Moment, keine Fehlermeldung, ich beobachte das mal weiter, danke dir. :)

Edit:
Es kam doch wieder eine Fehlermeldung, jetzt probiere ich den zweiten. ;)

Edit2:
Der ergibt diese Fehlermeldung:
[phpBB Debug] PHP Warning: in file [ROOT]/viewonline.php on line 361: Illegal offset type in isset or empty
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4820: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4822: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4823: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4824: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)


Wahrscheinlich lass ich den Code am besten im Original und ignoriere diesen Fehler, wenn er im nicht-Debugmodus nicht angezeigt wird. ^^
Tim

Tiptop

Tiptop
 
Posts: 68
Joined: 13 Nov 2009, 23:08
 
Resolution: 1280x1024


Re: Fehlermeldung in der viewonline.php

Postby 4seven » 30 Jan 2013, 22:35

Hmm, nochmal alles zurück und dann

Finde

Code: Select all
                                else if (sizeof($on_page_p) && isset($topic_post_ids[$on_page_p[1]]))
                                {

Ersetze mit

Code: Select all
                                else if (sizeof($on_page_p) && isset($topic_post_ids[$on_page_p[1]]) && isset($forum_data[$forum_id]['forum_name']))
                                {

Wie gesagt, der Code ist etwas crappy
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4seven

Tiptop

Tiptop
 
Posts: 318
Joined: 20 Jun 2012, 16:55
 
Resolution: 1920x1080


Re: Fehlermeldung in der viewonline.php

Postby Tim » 30 Jan 2013, 22:41

Da kommt dann diese Fehlermeldung:
[phpBB Debug] PHP Notice: in file [ROOT]/viewonline.php on line 361: Undefined index: 621
[phpBB Debug] PHP Notice: in file [ROOT]/viewonline.php on line 361: Undefined index:
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4820: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4822: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4823: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4824: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3848)


Schade, dass die MOD so fehlerhaft ist.
Tim

Tiptop

Tiptop
 
Posts: 68
Joined: 13 Nov 2009, 23:08
 
Resolution: 1280x1024


Re: Fehlermeldung in der viewonline.php

Postby 4seven » 30 Jan 2013, 22:58

Letzte Chance(n)

Finde

Code: Select all
                                else if (sizeof($on_page_p) && isset($topic_post_ids[$on_page_p[1]]))
                                {

Ersetze mit

Code: Select all
                                else if (sizeof($on_page_p) && isset($topic_post_ids[$on_page_p[1]]) && ($forum_data[$forum_id]['forum_name'] !== NULL))
                                {

Falls das nich klappt, hab ich noch einen
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4seven

Tiptop

Tiptop
 
Posts: 318
Joined: 20 Jun 2012, 16:55
 
Resolution: 1920x1080


PreviousNext

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron