When I try to delete a chat drupal simply returns a blank page and the chat continues there. The only way to delete a chat is to delete the entire chat room. And everytime I delete a chat room a warning appears:

* user warning: Unknown column 'crid' in 'where clause' query: DELETE FROM chatroom_ban_list WHERE crid = 79 in /var/www/www_drupal/sites/all/modules/chatroom/chatroom.module on line 192.
* user warning: Table 'www.chatroom_msg_archive' doesn't exist query: DELETE FROM chatroom_msg_archive WHERE ccid IN (2) in /var/www/www_drupal/sites/all/modules/chatroom/chatroom.module on line 198.

Is there something I'm doing wrong?

Comments

lsrzj’s picture

Version: 6.x-1.0-beta1 » 6.x-1.0-beta2

Sorry, it's at beta2!

timotheeinsf’s picture

I have the same issue with chat deletion. I don't see the error message when deleting a chatroom though.

The PHP logs have the following:
[01-Mar-2009 21:30:18] PHP Fatal error: Call to undefined function chatroom_chat_get_from_id() in /Users/myusername/Documents/www/drupal-6.10/sites/all/modules/chatroom/chatroom.forms.inc on line 452

I couldn't find said function indeed.

I commented out line 452 to bypass this issue but I came across another one and the chat wasn't deleted. It seems that the function chatroom_chat_delete is called with $form_state['values']['chat_id'] but this value doesn't seem to exist in $form_state...

I just started using Drupal so I'm not familiar with its and its modules' internals but I hope it will help.

rogerwebb’s picture

Not quite the same but using the beta 2 version and trying to delete a chatroom I get the message

Fatal error: Call to undefined function chatroom_chat_get_from_id() in /homepages/36/d186685211/htdocs/RetiredbutActive -Facilities/sites/all/modules/chatroom/chatroom.forms.inc on line 452

and the chat room concened stays in place

tobiberlin’s picture

To me both appears: the error message if I delete the chat room - and I am not able to delete a single chat within a chatroom. Is anyone working on this issue?

jvizcarrondo’s picture

well, i believe there error in file chatroom.install
on line 61

  $schema['chatroom_ban_list'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => t('Chatroom ID.'),
      ),
      'uid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => t('ID of the banned user.'),
      ),
      'admin_uid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => t('ID of the chatroom admin who imposed the ban.'),
      ),
      'modified' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => t('UNIX timestamp of when the ban was imposed.'),
      ),
    ),
    'primary key' => array('admin_uid', 'uid'),
  );

should be

  $schema['chatroom_ban_list'] = array(
    'fields' => array(
      'ccid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => t('Chatroom ID.'),
      ),
      'uid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => t('ID of the banned user.'),
      ),
      'admin_uid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => t('ID of the chatroom admin who imposed the ban.'),
      ),
      'modified' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => t('UNIX timestamp of when the ban was imposed.'),
      ),
    ),
    'primary key' => array('admin_uid', 'uid'),
  );

and the schema chatroom_msg_archive don.t exist, a possible scheme could be

  $schema['chatroom_msg_archive'] = array(
    'fields' => array(
      'cmid' => array(
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'ccid' => array(
        'type' => 'int',
        'not null' => TRUE,
      ),
      'uid' => array(
        'type' => 'int',
        'not null' => TRUE,
      ),
      'msg_type' => array(
        'type' => 'varchar',
        'length' => '64',
        'not null' => TRUE,
      ),
      'msg' => array(
        'type' => 'text',
        'size' => 'big',
      ),
      'sid' => array(
        'type' => 'varchar',
        'length' => '64',
        'not null' => TRUE,
      ),
      'recipient' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'archived' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'modified' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'ccid' => array('ccid'),
      'modified' => array('modified'),
      'recipient' => array('recipient'),
      'sid' => array('sid')
    ),
    'primary key' => array('cmid'),
  );

juan Vizcarrondo

Anonymous’s picture

Status: Active » Closed (duplicate)

this is a duplicate of #328811: Fatal error: Call to undefined function chatroom_chat_get_from_id() , please update to the latest DRUPAL-6--1 code and try again.