Einfache Fehler [Debug] beheben?

In diesem Forum kann man Fragen zur Programmierung stellen, die bei der Entwicklung von Mods für phpBB 3.0.x oder dem Modifizieren des eigenen Forums auftauchen.
Forumsregeln
phpBB 3.0 hat das Ende seiner Lebenszeit überschritten
phpBB 3.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 3.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf die neuste phpBB-Version, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Benutzeravatar
Shorty1968
Mitglied
Beiträge: 1894
Registriert: 08.09.2011 17:37

Re: Einfache Fehler [Debug] beheben?

Beitrag von Shorty1968 »

Hallo sorry immer noch das selbe:

Code: Alles auswählen

Undefined index: 
Benutzeravatar
BNa
Valued Contributor
Beiträge: 3169
Registriert: 12.04.2010 23:51
Kontaktdaten:

Re: Einfache Fehler [Debug] beheben?

Beitrag von BNa »

Mehr sagt die Meldung nicht? Warum sorry? Ich brauche mehr Input..
Benutzeravatar
Shorty1968
Mitglied
Beiträge: 1894
Registriert: 08.09.2011 17:37

Re: Einfache Fehler [Debug] beheben?

Beitrag von Shorty1968 »

Ich würde dir gerne mehr geben , aber mehr zeigt er im ACP unter DEBUG nicht an wie:

Code: Alles auswählen

Seite: downloads.php?view=detail&df_id=7
Datei: [ROOT]/includes/functions_awaystatus.php
Zeile: 61 [PHP Notice]

Undefined index:

Seite: portal.php?m=-137
Datei: [ROOT]/includes/functions_awaystatus.php
Zeile: 61 [PHP Notice]

Undefined index:  

Seite: portal.php?style=8&m18=138
Datei: [ROOT]/includes/functions_awaystatus.php
Zeile: 61 [PHP Notice]

Undefined index: 

Seite: viewforum.php?forum_uri=tutorial-base
Datei: [ROOT]/includes/functions_awaystatus.php
Zeile: 61 [PHP Notice]

Undefined index: 
Mittlerweile sind es wider 86 einträge die genau so aussehen nur die Zahlen ändern sich am ende bei der portal.php.
Im Forum selber wird überhaupt keine Debug Meldung angezeigt und ich habe in der config.php Debug angeschlatet.
Benutzeravatar
BNa
Valued Contributor
Beiträge: 3169
Registriert: 12.04.2010 23:51
Kontaktdaten:

Re: Einfache Fehler [Debug] beheben?

Beitrag von BNa »

Dann läuft der Debug Mod nicht richtig. Wenn der normale (volle) phpbb3 Debugmodus nichts anzeigt, dann ist auch nichts.
Benutzeravatar
Shorty1968
Mitglied
Beiträge: 1894
Registriert: 08.09.2011 17:37

Re: Einfache Fehler [Debug] beheben?

Beitrag von Shorty1968 »

Ich habe nun mal in Besagte Zeile 61 das eingetragen:

Code: Alles auswählen

$status['online_status'] = $opts[$status['online_status'] = false];
Da bekamm ich das,aber nur beim aufrufen von "Wer ist Online?":

Code: Alles auswählen

[phpBB Debug] PHP Notice: in file [ROOT]/viewonline.php on line 478: Undefined index:
[phpBB Debug] PHP Notice: in file [ROOT]/viewonline.php on line 479: Undefined index:
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5174: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3960)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5176: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3960)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5177: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3960)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5178: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3960)
Benutzeravatar
BNa
Valued Contributor
Beiträge: 3169
Registriert: 12.04.2010 23:51
Kontaktdaten:

Re: Einfache Fehler [Debug] beheben?

Beitrag von BNa »

Finde

Code: Alles auswählen

    // change $status['online_status'] to the corresponding string
    $status['online_status'] = $opts[$status['online_status']]; 
Ersetze mit

Code: Alles auswählen

    // change $status['online_status'] to the corresponding string
   if ((isset($opts) && !empty($opts)) && (isset($status) && !empty($status)))
   {
   $status['online_status'] = $opts[$status['online_status']];
   } 
Benutzeravatar
Shorty1968
Mitglied
Beiträge: 1894
Registriert: 08.09.2011 17:37

Re: Einfache Fehler [Debug] beheben?

Beitrag von Shorty1968 »

Hallo BNa
Die Debug meldung bleibt immer noch unverändert.

Der Fehler wird in der viewonline.php durch diesen eintrag verursacht:

Code: Alles auswählen

'ONLINE_STATUS'     => $opts[$row['online_status']]['opts'] . ' - ' . $row['online_status_msg'] . ' ' . parse_busy_status($row['busy_status']),
    'ONLINE_STATUS_ICON'  => $opts[$row['online_status']]['icon'],
Benutzeravatar
BNa
Valued Contributor
Beiträge: 3169
Registriert: 12.04.2010 23:51
Kontaktdaten:

Re: Einfache Fehler [Debug] beheben?

Beitrag von BNa »

Sag das doch gleich. Ich dachte die Datei functions_awaystatus.php würde includiert in die viewonline.php :-?
Zuletzt geändert von BNa am 28.03.2012 19:26, insgesamt 1-mal geändert.
Benutzeravatar
Shorty1968
Mitglied
Beiträge: 1894
Registriert: 08.09.2011 17:37

Re: Einfache Fehler [Debug] beheben?

Beitrag von Shorty1968 »

Wird sie Laut anleitung auch mit diesem Code:

Code: Alles auswählen

 $user->add_lang('mods/awaystatus');
    include_once($phpbb_root_path . 'includes/functions_awaystatus.' . $phpEx);
    $opts = get_online_status_options();
Benutzeravatar
BNa
Valued Contributor
Beiträge: 3169
Registriert: 12.04.2010 23:51
Kontaktdaten:

Re: Einfache Fehler [Debug] beheben?

Beitrag von BNa »

Ersetze

Code: Alles auswählen

'ONLINE_STATUS'     => $opts[$row['online_status']]['opts'] . ' - ' . $row['online_status_msg'] . ' ' . parse_busy_status($row['busy_status']),
    'ONLINE_STATUS_ICON'  => $opts[$row['online_status']]['icon'], 
Mit

Code: Alles auswählen

'ONLINE_STATUS'     => ((isset($opts) && !empty($opts)) && (isset($row) && !empty($row))) ? $opts[$row['online_status']]['opts'] . ' - ' . $row['online_status_msg'] . '  ' . parse_busy_status($row['busy_status']) : false,
    'ONLINE_STATUS_ICON'  => ((isset($opts) && !empty($opts)) && (isset($row) && !empty($row))) ? $opts[$row['online_status']]['icon'] : false, 
Weiterer Support bitte durch Andere. Dein Main Board Code und Deine Mods scheinen das Bermuda Dreieck zu sein.
Antworten

Zurück zu „[3.0.x] Mod Bastelstube“