bugs in forum bij check alvorens te updaten

Hulp nodig bij je installatie of kom je ergens niet uit? Probeer phpBB3! Problemen lossen we samen met je op.
phpBB 3.0 is End of support per 1 januari 2017. Dit forum is hier enkel ter archief. Het wordt aangeraden te upgraden naar phpBB 3.2
Forumregels
phpBB 3.0 is End of support per 1 januari 2017. Dit forum is hier enkel ter archief. Het wordt aangeraden te upgraden naar phpBB 3.2
Gesloten
Danny L
Berichten: 176
Lid geworden op: 14 jan 2011, 17:43
Locatie: Neerpelt (B)
Contacteer:

bugs in forum bij check alvorens te updaten

Bericht door Danny L » 21 jul 2011, 08:06

  • Adres van je forum: http://www.divinglommel.be/phpBB3
    Event. modificaties op je forum:diverse
    Wanneer ontstond het probleem?controle op bugs
    phpBB versie:3.0.8


    Heb je onlangs iets veranderd aan je forum?nog niet
    Wat is het probleem?
Voordat ik de update naar 3.0.9 wil doen heb ik eerst een controle doorgevoerd op bugs
dit heb ik gedaan door de "\\ "weg te halen voor deze code in config.php:

Code: Selecteer alles

@define('DEBUG', true);
En dan krijg ik volgende foutmeldingen:

Code: Selecteer alles

[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2623: Constant ANNOUNCEMENTS_CENTRE_TABLE already defined
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2624: Constant GROUPS_ONLY already defined
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2625: Constant EVERYONE already defined
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2626: Constant GUESTS_ONLY already defined
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4090: Undefined variable: l_b_user_s
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4090: Undefined variable: l_online_users
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4090: Undefined variable: l_b_user_s
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4090: Undefined variable: l_b_user_s
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4090: Undefined variable: l_b_user_s
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4090: Undefined variable: l_b_user_s
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4624: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3715)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4626: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3715)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4627: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3715)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4628: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3715)


Moet dit eerst opgelost worden vooraleer ik upgrade naar 3.0.9, of kan ik gewoon doorgaan met een update?
En dan vooral de vraag, hoe los ik deze foutmeldingen op?

Dit is mijn /includes/functions.php van lijn 2622 tot einde:

Code: Selecteer alles

// lefty74 Announcement Centre
define('ANNOUNCEMENTS_CENTRE_TABLE',$table_prefix . 'announcement_centre');
define('GROUPS_ONLY', 0);
define('EVERYONE', 1);
define('GUESTS_ONLY', 2);
?>
Dit is mijn /includes/functions.php van lijn 4079 tot 4113

Code: Selecteer alles

	// Build online listing
	$vars_online = array(
		'ONLINE'	=> array('total_online', 'l_t_user_s', 0),
		'REG'		=> array('visible_online', 'l_r_user_s', !$config['load_online_guests']),
		'HIDDEN'	=> array('hidden_online', 'l_h_user_s', $config['load_online_guests']),
		'GUEST'		=> array('guests_online', 'l_g_user_s', 0),
        'BOT'       => array('bots_online', 'l_b_user_s', 0),
	);

	foreach ($vars_online as $l_prefix => $var_ary)
	{
    $l_online_users .= sprintf($l_b_user_s, $online_users['bots_online']);
		if ($var_ary[2])
		{
			$l_suffix = '_AND';
		}
		else
		{
			$l_suffix = '';
		}
		switch ($online_users[$var_ary[0]])
		{
			case 0:
				${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_ZERO_TOTAL' . $l_suffix];
			break;

			case 1:
				${$var_ary[1]} = $user->lang[$l_prefix . '_USER_TOTAL' . $l_suffix];
			break;

			default:
				${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_TOTAL' . $l_suffix];
			break;
		}
	}
en dit van lijn 4623 tot 4630

Code: Selecteer alles

	// application/xhtml+xml not used because of IE
	header('Content-type: text/html; charset=UTF-8');

	header('Cache-Control: private, no-cache="set-cookie"');
	header('Expires: 0');
	header('Pragma: no-cache');

	return;
}

Gebruikersavatar
Ger
Berichten: 4864
Lid geworden op: 03 jan 2006, 22:23
Locatie: 192.68.1.100
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Ger » 21 jul 2011, 08:46

Deze:

Code: Selecteer alles

// lefty74 Announcement Centre
define('ANNOUNCEMENTS_CENTRE_TABLE',$table_prefix . 'announcement_centre');
define('GROUPS_ONLY', 0);
define('EVERYONE', 1);
define('GUESTS_ONLY', 2);
?>
Hoort volgens mij helemaal niet in functions.php thuis. Ik zou die eerder in contstants.php zetten eigenlijk.

De tweede, over de undefined variables kan ik weinig over zeggen zonder de rest van de MOD te kennen en voor de derde moeten we weten wat er in /includes/functions.php:3715 staat.

Danny L
Berichten: 176
Lid geworden op: 14 jan 2011, 17:43
Locatie: Neerpelt (B)
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Danny L » 21 jul 2011, 08:58

Ger,

Ik heb een kleine fout gezien in mijn posting:
deze code staat in mijn includes/function_posting.php

Code: Selecteer alles

// lefty74 Announcement Centre
define('ANNOUNCEMENTS_CENTRE_TABLE',$table_prefix . 'announcement_centre');
define('GROUPS_ONLY', 0);
define('EVERYONE', 1);
define('GUESTS_ONLY', 2);
?>

Kan het tweede kwaad (undefined variables)?
Ik weet dat ik een aantal vertalingen nog niet helemaal heb doorgevoerd, maar deze zijn enkle in het ACP storend, en daar kan ik nu nog mee leven. (kalenderMOD)
Ik weet niet of dit een reden kan zijn hiervan.



Hier is mijn /includes/function.php:3715

Code: Selecteer alles

				echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";
Kan ik met het updaten beginnen van mijn forum of moeten deze "fouten" (PHP Notice) eerst opgelost worden?

Gebruikersavatar
Ger
Berichten: 4864
Lid geworden op: 03 jan 2006, 22:23
Locatie: 192.68.1.100
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Ger » 21 jul 2011, 09:15

De update zal wel goed verlopen, dat is het probleem niet. Het zijn meer schoonheidsfoutjes. E_NOTICE zijn niet meer dan opmerkingen: "pas op, hier zit mogelijk een fout."

Je kunt ze volgens mij allemaal oplossen, maar ik denk dat de MOD die deze veroorzaakt gewoon nog niet af is (of iig erg slordig is gemaakt).

Danny L
Berichten: 176
Lid geworden op: 14 jan 2011, 17:43
Locatie: Neerpelt (B)
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Danny L » 21 jul 2011, 09:16

ga dan eens starten met de update.
Op hoop van zegen. . .

Gebruikersavatar
Ger
Berichten: 4864
Lid geworden op: 03 jan 2006, 22:23
Locatie: 192.68.1.100
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Ger » 21 jul 2011, 09:34

Ik zit nog eens te kijken naar de Announcement MOD, maar sommige dingen kloppen niet hoor. De constants die je in posting.php hebt staan horen volgens de MOD gewoon in constants.php.

De undifined variables komen waarschijnlijk door ontbrekende taalvariablen, zie hier.

Danny L
Berichten: 176
Lid geworden op: 14 jan 2011, 17:43
Locatie: Neerpelt (B)
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Danny L » 21 jul 2011, 09:44

Aiai,
Deze foutmelding krijg ik nu bij het aanroepen van mijn forum:

Code: Selecteer alles

Fatal error: Cannot redeclare phpbb_bump_topic() (previously declared in /home/divinglo/domains/divinglommel.be/public_html/phpBB3/includes/functions_posting.php:2636) in /home/divinglo/domains/divinglommel.be/public_html/phpBB3/includes/functions_posting.php on line 2824
Dit is mijn includes/functions_posting.php ( 2622 - 2646)

Code: Selecteer alles

/**
* Handle topic bumping
* @param int $forum_id The ID of the forum the topic is being bumped belongs to
* @param int $topic_id The ID of the topic is being bumping
* @param array $post_data Passes some topic parameters:
*				- 'topic_title'
*				- 'topic_last_post_id'
*				- 'topic_last_poster_id'
*				- 'topic_last_post_subject'
*				- 'topic_last_poster_name'
*				- 'topic_last_poster_colour'
* @param int $bump_time The time at which topic was bumped, usually it is a current time as obtained via time(). 
* @return string An URL to the bumped topic, example: ./viewtopic.php?forum_id=1&amptopic_id=2&ampp=3#p3
*/
function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
{
	global $config, $db, $user, $phpEx, $phpbb_root_path;

	if ($bump_time === false)
	{
		$bump_time = time();
	}

	// Begin bumping
	$db->sql_transaction('begin');
en dit van 2790 tot einde:

Code: Selecteer alles

	// Update forum tracking info
	if ($config['load_db_lastread'] && $user->data['is_registered'])
	{
		$sql = 'SELECT mark_time
			FROM ' . FORUMS_TRACK_TABLE . '
			WHERE user_id = ' . $user->data['user_id'] . '
				AND forum_id = ' . $forum_id;
		$result = $db->sql_query($sql);
		$f_mark_time = (int) $db->sql_fetchfield('mark_time');
		$db->sql_freeresult($result);
	}
	else if ($config['load_anon_lastread'] || $user->data['is_registered'])
	{
		$f_mark_time = false;
	}

	if (($config['load_db_lastread'] && $user->data['is_registered']) || $config['load_anon_lastread'] || $user->data['is_registered'])
	{
		// Update forum info
		$sql = 'SELECT forum_last_post_time
			FROM ' . FORUMS_TABLE . '
			WHERE forum_id = ' . $forum_id;
		$result = $db->sql_query($sql);
		$forum_last_post_time = (int) $db->sql_fetchfield('forum_last_post_time');
		$db->sql_freeresult($result);

		update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time, false);
	}

	add_log('mod', $forum_id, $topic_id, 'LOG_BUMP_TOPIC', $post_data['topic_title']);

	$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";

	return $url;
}

// lefty74 Announcement Centre
define('ANNOUNCEMENTS_CENTRE_TABLE',$table_prefix . 'announcement_centre');
define('GROUPS_ONLY', 0);
define('EVERYONE', 1);
define('GUESTS_ONLY', 2);
?>

Gebruikersavatar
Ger
Berichten: 4864
Lid geworden op: 03 jan 2006, 22:23
Locatie: 192.68.1.100
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Ger » 21 jul 2011, 09:55

Weet je het zeker? Want phpbb_bump_topic() komt in dat onderste stuk niet voor.

Danny L
Berichten: 176
Lid geworden op: 14 jan 2011, 17:43
Locatie: Neerpelt (B)
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Danny L » 21 jul 2011, 10:02

Dat is wat er staat.
Hoe krijg ik mijn volledige includes/functions_posting.php bij jou?


Danny L
Berichten: 176
Lid geworden op: 14 jan 2011, 17:43
Locatie: Neerpelt (B)
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Danny L » 21 jul 2011, 10:07

functions_posting.php

Danny L
Berichten: 176
Lid geworden op: 14 jan 2011, 17:43
Locatie: Neerpelt (B)
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Danny L » 21 jul 2011, 10:21

Ger schreef:Ik zit nog eens te kijken naar de Announcement MOD, maar sommige dingen kloppen niet hoor. De constants die je in posting.php hebt staan horen volgens de MOD gewoon in constants.php.
Klopt inderdaad Ger,

Dit heb ik ondertussen uit mijn posting.php gehaald. Opnieuw geupload, maar mijn fatal error blijft nog bestaan (had ook niets anders verwacht, gezien de foutmelding)

Trouwens tijdens de update ging alles goed, geen vastloper, geen foutmelding enz. . . .

Gebruikersavatar
Ger
Berichten: 4864
Lid geworden op: 03 jan 2006, 22:23
Locatie: 192.68.1.100
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Ger » 21 jul 2011, 10:57

Dat bestand heeft 2x direct onder elkaar de function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false). De eerste begint op regel 2636 en tweede eindigt op regel 2824 en daar komt die foutmelding vandaan.

Ik verwacht dat bij de update er een wijziging is geweest in deze functie. Je kunt het beste even kijken hoe de functie er in een schoon 3.0.9-bestand eruit ziet en die functie erin kopieëren (en dus de twee functies die er nu instaan weghalen).

Danny L
Berichten: 176
Lid geworden op: 14 jan 2011, 17:43
Locatie: Neerpelt (B)
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Danny L » 21 jul 2011, 11:08

Ger,

Ik heb dit dubbel deel er uit gehaald, en dit lijkt het te doen.
Ik heb weer toegang tot mijn forum.
Ga even verder testen, en alvast bedankt!
(enig idee hoe dit gebeurd kan zijn?)

Gebruikersavatar
Ger
Berichten: 4864
Lid geworden op: 03 jan 2006, 22:23
Locatie: 192.68.1.100
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Ger » 21 jul 2011, 12:08

Danny L schreef: (enig idee hoe dit gebeurd kan zijn?)
Ik denk haast bij het samenvoegen van wijzigingen oid. Achteraf een beetje moeilijk in te schatten.

Danny L
Berichten: 176
Lid geworden op: 14 jan 2011, 17:43
Locatie: Neerpelt (B)
Contacteer:

Re: bugs in forum bij check alvorens te updaten

Bericht door Danny L » 21 jul 2011, 12:40

In ieder geval bedankt voor jou voortreffelijke hulp!

Gesloten