Hi everyone i tryed to install Chatblock on 2websites and everytime I get this error

Fatal error: Call to undefined function drupal_install_schema() in /users/kambanit/public_html/modules/chatblock/chatblock.install on line 47

Help please ;]

Comments

dwees’s picture

Hrmmm. Are you downloading and installing the right version? Or have I goofed up the .install files?

Let me check and get back to you.

brzbg’s picture

/*
* Implementation of hook_install
*/
function chatblock_install() {
// Create tables.
drupal_install_schema('chatblock');

}

I THINK SOMETHING IS MISSING HERE ;]]]

Version is "5.x-1.0.x-dev 2008-Aug-31 20 KB"

Drupal Version: 5.7

dwees’s picture

Yeah it's a major CVS oops on my part. I have uploaded the 6.x version of this module over the 5.x version.

You'll have to be patient and wait for me to get a chance to fix my oops sometime soon.

Dave

brzbg’s picture

Mmmmm ok ;]]]

brzbg’s picture

did u fix it mate?

Anonymous’s picture

Was this fixed?

dwees’s picture

This is not yet fixed. I'm sorry, I'm very busy and have not yet been able to find the time to do this.

Anonymous’s picture

Question

Do u perhaps have a timeline on this?

Thanks.

Kahenya

Anonymous’s picture

Submission error, please ignore double post.

dwees’s picture

Okay quick fix for now:

Replace chatblock.install shipped with the 5.x version with the following including the php tags:


// $Id$

/*
 * Implementation of hook_install
 */
function chatblock_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {chatblock} (
                  message varchar(255),
                  username varchar(60),
                  timestamp bigint(14),
                  messageid int(10) NOT NULL auto_increment,
                  PRIMARY KEY (messageid)
                ) /*!40100 DEFAULT CHARACTER SET utf8 */;"
      );
      break;

    case 'pgsql':
      db_query("CREATE TABLE {chatblock} (
                  message text,
                  username text,
                  timestamp bigint,
                  messageid SERIAL PRIMARY KEY
                );"
      );
      break;
  }

}

/*
 * Implementation of hook_uninstall
 */
function chatblock_uninstall() {
  db_query('DROP TABLE {chatblock}');
  variable_del('chatblock_number_messages');
  variable_del('chatblock_get_url');
  variable_del('chatblock_ignore_user_1');
  variable_del('chatblock_refresh_rate');
  variable_del('chatboxlastmessage');
  variable_del('chatblock_show_logouts');
  variable_del('chatblock_show_logins');
  variable_del('chatblock_show_empty');
}


function chatblock_update_1() {
  $items = array();
  $items[] = update_sql("ALTER TABLE {chatblock} CHANGE timestamp timestamp BIGINT( 14 ) NULL DEFAULT NULL");
  return $items;
}

function chatblock_update_2() {
  $items = array();

  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      break;

    case 'pgsql':
      $items[] = update_sql("ALTER TABLE {chatblock} ALTER 'timestamp' TYPE bigint;");
      break;
  }

  return $items;
}

dwees’s picture

Assigned: brzbg » dwees
Category: support » bug
Status: Active » Fixed

This is fixed in CVS. Since this is a devel module, please be patient to wait for the newest version to be included in the tarball (at most 12 hours from when I posted this).

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Bartels-1’s picture

Status: Closed (fixed) » Active

Got this error on a freshly downloaded copy of chatblock

kardave’s picture

The tarball is still old, containing the installer of version 6

Anonymous’s picture

Status: Active » Closed (fixed)