Closed (fixed)
Project:
Chatroom
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Mar 2007 at 18:18 UTC
Updated:
4 May 2007 at 13:30 UTC
Hi,
Chat Room keeps telling me that:
user warning: Duplicate entry '27' for key 1 query: INSERT INTO chatroom_msg_archive (cmid, ccid, uid, msg_type, msg, session_id, recipient, modified) SELECT * FROM chatroom_msg WHERE ccid = 6 AND cmid < 213 in /home/parateam/public_html/includes/database.mysql.inc on line 172.
I tried deleting all entries in chatroom_msg_archive, that makes chat room work quietly once, and then it keeps bugging me again at next reload.
What can go wrong ?
Thanks,
Xav
Comments
Comment #1
darren ohI will look into this when I have time if no one else does. Until then, you can prevent the error by unchecking "Automatically archive old messages" in admin/settings/chatroom.
Comment #2
skizzo commentedJust to confirm: I am getting the same error (also, displayed msg counter changes erratically). Thank you.
Duplicate entry '399' for key 1 query: INSERT INTO chatroom_msg_archive (cmid, ccid, uid, msg_type, msg, session_id, recipient, modified) SELECT * FROM chatroom_msg WHERE ccid = 7 AND cmid < 400 in /var/www/cms50/includes/database.mysql.inc nella riga 172.Comment #3
hiweed commentedYes, I'm experiencing the same error as well:
Comment #4
darren ohThis could happen if two users enter the chat at the same time. Automatically archiving old messages is a feature for advanced users. At the moment, archiving is done whenever a user enters the chat. The logic was that it should work for sites that didn't have cron set up.
Maybe archiving should be a cron job. Any user advanced enough to use this feature should also be advanced enough to set up cron. What do you think?
Comment #5
darren ohFixed in CVS commit 63778. Turned out to be a simple error in a variable name.
Comment #6
xav commentedEven if you fixed it, I tend to think that archiving would better be done by cron. If the user can't install cron on its machine, there are ways around that.
Comment #7
(not verified) commented