Seite 1 von 3

[Problem] Beitrag löschen funzt nichtmehr...

Verfasst: 19.02.2006 03:13
von gonZaleZ
Hallo,

ich habe den Archiv-MOD in ein meinem Forum eingebaut.

Leider bekomme ich nun folgenden Fehler, wenn ich einen Beitrag löschen will (über das "X" rechts oben im Beitrag, zwischen "edit" und "ip")
Allgemeiner Fehler

Could not create new topic

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 's baustelle', 2, 1126315994, 11, 0, 424, 424)' at line 2

INSERT INTO forum_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_first_post_id, topic_last_post_id) VALUES ('mo's baustelle', 2, 1126315994, 11, 0, 424, 424)

Line : 660
File : functions_post.php
Hat jemand eine Ahnung was ich "verhunzt" habe?

Verfasst: 20.02.2006 22:45
von gonZaleZ
*schieb* :roll:

Kann jemand etwas mir der Fehlermeldung anfangen?

Verfasst: 20.02.2006 23:59
von S2B
Hui, da hast du einen Fehler in meinem MOD gefunden... *duck*

Code: Alles auswählen

#
#-----[ OPEN ]-------------------------------------------
#
includes/functions_post.php

#
#-----[ FIND ]-------------------------------------------
#
			$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_first_post_id, topic_last_post_id)
				VALUES ('" . $post_info['topic_title'] . "', " . $post_info['topic_poster'] . ", " . $post_info['topic_time'] . ", " . $board_config['archive_forum'] . ", " . $post_info['topic_status'] . ", $post_id, $post_id)";

#
#-----[ IN-LINE FIND ]-----------------------------------
#
$post_info['topic_title']

#
#-----[ REPLACE WITH ]-----------------------------------
#
str_replace("'", "''", $post_info['topic_title'])
Dieser Fehler wird (wie die anderen auch) in der nächsten Version korrigiert, nur bis dahin wird es leider noch eine Weile dauern. :-?

Verfasst: 21.02.2006 01:29
von gonZaleZ
Oh, okay... Ich habe mal dinen Code-Schnipsel geändert und bekomme jetzt beim löschen/archivieren folgenden Text, vielleicht hilft Dir das irgendwie weiter...
Error in posting

DEBUG MODE

SQL Error : 1054 Unknown column '766topic_vote' in 'field list'

UPDATE forum_topics SET topic_replies = topic_replies - 1, topic_last_post_id = 766topic_vote = 0 WHERE topic_id = 83

Line : 475
File : functions_post.php

Verfasst: 21.02.2006 19:00
von S2B

Code: Alles auswählen

#
#-----[ OPEN ]-------------------------------------------
#
includes/functions_post.php

#
#-----[ FIND ]-------------------------------------------
#
		$topic_update_sql .= 'topic_vote = 0';
		
#
#-----[ REPLACE WITH ]-----------------------------------
#
		$topic_update_sql .= ' topic_vote = 0';

Verfasst: 21.02.2006 22:30
von gonZaleZ
Habe ich gleich mal geändert, aber ich bekomme wieder eine ähnliche Fehlermeldung...
Zumindest wird der Beitrag gelöscht/archiviert...
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 'topic_vote = 0 WHERE topic_id = 76' at line 2

UPDATE forum_topics SET topic_replies = topic_replies - 1, topic_first_post_id = 583 topic_vote = 0 WHERE topic_id = 76

Line : 475
File : functions_post.php
Ich stelle mal meine functions_post zur Verfügung...
http://gonzalez.go.funpic.de/driss/functions_post.txt

Verfasst: 21.02.2006 23:06
von S2B
Dann häng vor dem von mir eingefügten Leerzeichen ein Komma dran. :wink:

Verfasst: 22.02.2006 15:48
von gonZaleZ
Okay, jetzt kann ich Beiträge ohne Fehlermeldung löschen.
Leider wird der Beitrag nicht angezeigt unter "Letzter Beitrag" im Archiv-Forum, aber das ist auch nur Kosmetik...

Wenn ich den Beitrag wiederherstellen will bekomme ich wieder eine ähnliche Fehlermeldung... Wenn ich's verstehen würde, würde ich mich hier nicht melden :roll:
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 ' topic_vote = 0 WHERE topic_id = 128' at line 2

UPDATE forum_topics SET , topic_vote = 0 WHERE topic_id = 128

Line : 475
File : functions_post.php
Ich weiß, ich bin schlimm... :oops:

Verfasst: 22.02.2006 18:08
von S2B
gonZaleZ hat geschrieben:Ich weiß, ich bin schlimm... :oops:
Nein, das stimmt nicht. Der MOD benötigt schlicht und einfach ein Update, nur fehlt mir im Moment einfach die Zeit dazu... :-?

Der Fehler kommt von den Änderungen, die ich dir im letzten Beitrag gesagt habe:

Code: Alles auswählen

#
#-----[ OPEN ]-------------------------------------------
#
includes/functions_post.php

#
#-----[ FIND ]-------------------------------------------
#
      $topic_update_sql .= ', topic_vote = 0';
      
#
#-----[ REPLACE WITH ]-----------------------------------
#
      $topic_update_sql .= ($topic_update_sql != '') ? ', topic_vote = 0' : 'topic_vote = 0';
Jetzt sollte es zumindest mit dieser Codestelle keine Probleme mehr geben.

Ich würde dir empfehlen, einen Link zu diesem Beitrag zu speichern, da es sein kann, dass du die Änderungen beim nächsten Update des MODs rückgängig machen musst, damit der MOD danach wieder läuft. :wink:

Verfasst: 23.02.2006 11:38
von gonZaleZ
Habe den Code geändert und bekomme bei der Löschmethode mit "X" wieder die Meldung aus meinem letzten Beitrag. Lösche ich aus der Moderation oder stelle ich das Thema wieder her, ist alles in Ordnung. :grin:

Aber ich warte bis Du in Ruhe ein Update gebastelt hast, bloß kein Stress, bis auf die kleinen Macken ist das immer noch ein saugeiler MOD!!!
*schleim* *Honig um den Mund schmierend* :lol:
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 ' topic_vote = 0, topic_vote = 0 WHERE topic_id = 100' at lin

UPDATE forum_topics SET , topic_vote = 0, topic_vote = 0 WHERE topic_id = 100

Line : 475
File : functions_post.php