SQL Error When Updating Chat Settings

Grinch2171 - October 30, 2008 - 12:48
Project:Chat Room
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Paul Kishimoto
Status:closed
Description

I tried editing the settings for Update Frequency and Old Messages in Chat and received this error:

user warning: 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 nid = 35' at line 8 query: UPDATE chatroom SET poll_freq = 10000, idle_freq = 60000, old_msg_count = 10, kicked_out_message = '', banned_message = '', WHERE nid = 35 in /home3/sites/all/modules/chatroom/chatroom.module on line 157.

The settings I changed also did not take.

#1

pbc - November 2, 2008 - 22:09

if i understand it right, there are excessive commas in chatroom.module, function chatroom_update, at the end of lines 148 and 156.
when i removed them, the update in table chatroom succeeded.

(however, when re-entering the edit panel to check the freshly entered values, the kicked out message and banned message are not displayed. so my answer provokes another question ;-)

#2

Babalu - November 7, 2008 - 17:41

i have the same error

#3

miahawk - November 25, 2008 - 19:38

I do as well, running drupal 6.6 on php 5.2.

#4

korvus - December 29, 2008 - 16:28

Same here with Drupal 6.8. The error is actually just an extra comma on line 148 (before the "WHERE" on the next line). The comma on 157 is just a style thing (and I believe should be there, according to Drupal coding standards).

#5

CKIDOW - December 30, 2008 - 01:31

Same problem here :O

#6

Max_Headroom - January 2, 2009 - 07:12

Confirm. #4 sorts out the problem.

#7

Paul Kishimoto - March 29, 2009 - 16:05
Assigned to:Anonymous» Paul Kishimoto
Status:active» reviewed & tested by the community

An actual patch! Originally posted to #335713: user warning on update...

AttachmentSize
328089.patch 379 bytes

#8

neofutur - April 5, 2009 - 23:20

I confirm this patch is ok ( removing the last comma )

#9

justinrandell - November 11, 2009 - 12:36
Version:6.x-1.0-beta2» 6.x-2.x-dev
Status:reviewed & tested by the community» postponed (maintainer needs more info)

does this apply to the 6.x-2 branch?

#10

justinrandell - November 15, 2009 - 12:44
Status:postponed (maintainer needs more info)» closed
 
 

Drupal is a registered trademark of Dries Buytaert.