Seite 1 von 4

Error in posting / DEBUG MODE

Verfasst: 08.10.2004 17:32
von ambitel
hallo,

nun hab ich seit einiger Zeit schon das phpBB-Forum installiert und bin begeistert von Eurer Arbeit.
Leider hab ich natürlich vor lauter Begeisterung schon manche MOD's eingebaut, was ja bis heute keine Probleme verursachte.
Nun, nachdem ich den "categorie_hack105" eigebaut habe und versuchte einen Beitrag zu editieren kam folgende Fehlermeldung:
Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE topic_id = 16' at line 1

UPDATE phpbb_topics SET topic_title = 'Neu im Forum', topic_type = 2, topic_vote = 0, k_id= WHERE topic_id = 16

Line : 258
File : /xxx/xxx/phpBB2/includes/functions_post.php
Da ich zwar begeisteter Anfänger aber eben "nur" Anfänger bin und die Suchfunktion mir auch bei vielen anderen kleineren Problemen weitergeholfen hat stehe ich aber hier vor einem von mir unlösbarem Rätsel.

Bevor ich's vergesse, ich arbeite mit der Version 2.0.10


Meine "functions_post.php":
functions_post.php

Vielen Dank schon mal im Voraus

Verfasst: 09.10.2004 14:52
von Underhill
Hi,

bitte schau dir die Einbauanleitung des Mods nochmals genau an (Besser Schritt fuer Schritt nochmals durchgehen)...

Die Fehlermeldung sagt dass "$k_id" nicht richtig ankommt...
UPDATE phpbb_topics SET topic_title = 'Neu im Forum', topic_type = 2, topic_vote = 0, k_id= WHERE topic_id = 16
Gruss
Underhill

Verfasst: 10.10.2004 12:36
von ambitel
Hallo Underhill,

und danke für Deine Antwort.
Habe nochmal alles überprüft und es scheint alles in Ordnung mit dem Einbau zu sein.
Verstehe das selber nicht.
Naja, vielleicht liegts ja wirklich an überMODung meines Forums
:-?
Meine erste Idee war auch, diesen Eintrag "$k_id" zu überprüfen.

Naja werde mal eines neues Forum aufsetzten und als erstes diesen Hack installieren.

Vielen Dank nochmals
warst ja meine einzige Hilfestellung
:wink:

Verfasst: 11.10.2004 18:25
von Acid
Vom Category MOD stammt das "k_id" aber nicht oder?

Verfasst: 11.10.2004 18:30
von Leuchte
Kannst du mal die posting.php als .txt abspeichern und den Link zu ihr posten?

Verfasst: 11.10.2004 18:59
von ambitel
Erstmal vielen Dank, dass Ihr Euch um mein Anliegen kümmert.

@Acid

Ja, richtig, von diesem Mod stammt dieses undurchsichtige "k_id" !!
Naja, ich bin zwar noch keine Leuchte in php aber ich vermute stark, dass das rot Hervorgehobene dafür verantwortlich ist.
open includes/function_post.php

##------Find----
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length)

##----Change the end of row-----
&$poll_options, &$poll_length, &$k_id)

##-----------------------------


##----FIND in function submit_post------
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";

##----Replace with----

$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote,k_id) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, $k_id)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . ", k_id=$k_id WHERE topic_id = $topic_id";

##--------------------

Save an close the function_post.php
##########################################


@Leuchte

Naja, ich könnte Dir natürlich die posting.php abspeichern, aber ich glaube, das bringt nichts. Hab das ganz rückgängig gemacht, obwohl ich diesen Kategorie-Hack wirklich brauchen könnte. :(

...oder gibts vielleicht doch noch Hoffnung?

Vielen Dank nochmal für Eure Mühe

Verfasst: 11.10.2004 19:02
von Acid
Bau den MOD erneut ein und verlinke dann functions_post.php/posting.php, wenn der Fehler wieder auftritt.

Verfasst: 11.10.2004 19:15
von ambitel
Okay, ...werd mich gleich hinsetzen und losarbeiten!!

Vielen, vielen Dank!!! :)

Verfasst: 11.10.2004 19:23
von Leuchte
Wenn du beim einbauen bist:
In der posting.php sollst du das durchführen

Code: Alles auswählen

##----Find---
	$preview_subject = $subject;
	$preview_username = $username;

##----Add After----
	//kategorien
	$previews_k_id= $k_id;
	//kategorien
Statt diesem Add After mach mal dieses

Code: Alles auswählen

##----Add After----
	//kategorien
	$k_id = $HTTP_POST_VARS['k_id'];
	$previews_k_id= $k_id;
	//kategorien

Verfasst: 11.10.2004 20:32
von ambitel
Hallo Leuchte,

habe auch Deinen Vorschlag eingearbeitet.
Leider kommt die selbe Fehlermeldung. :(

posting.php
functions_post.php

Hoffe, Ihr könnt damit etwas anfangen.

Lieben Dank schon mal im Voraus