Fatal Error on install

shadow2man - September 18, 2008 - 10:52
Project:Chatblock
Version:5.x-1.0.x-dev
Component:Miscellaneous
Category:bug report
Priority:critical
Assigned:dwees
Status:closed
Description

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 ;]

#1

dwees - September 18, 2008 - 11:44

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.

#2

shadow2man - September 18, 2008 - 12:07

/*
* 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

#3

dwees - September 18, 2008 - 15:02

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

#4

shadow2man - September 19, 2008 - 11:30

Mmmmm ok ;]]]

#5

shadow2man - October 15, 2008 - 09:34

did u fix it mate?

#6

kahenya - October 22, 2008 - 20:52

Was this fixed?

#7

dwees - October 23, 2008 - 05:46

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.

#8

kahenya - October 25, 2008 - 19:48

Question

Do u perhaps have a timeline on this?

Thanks.

Kahenya

#9

kahenya - October 25, 2008 - 19:49

Submission error, please ignore double post.

#10

dwees - October 29, 2008 - 13:00

Okay quick fix for now:

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

<?php
// $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;
}
?>

#11

dwees - October 29, 2008 - 13:16
Category:support request» bug report
Assigned to:shadow2man» dwees
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).

#12

Anonymous (not verified) - November 12, 2008 - 13:53
Status:fixed» closed

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

#13

Bartels - February 25, 2009 - 00:12
Status:closed» active

Got this error on a freshly downloaded copy of chatblock

#14

kardave - March 9, 2009 - 11:35

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

#15

kahenya - September 3, 2009 - 16:27
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.