Missing default values for guestbook table

drupal4normi - January 2, 2009 - 14:25
Project:Guestbook
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Hello,

I am using Drupal 6.8 with some modules. All works fine.

I try to install the guestbook module, since Drupal 6.1, but I always get following error messages:

* user warning: Table 'royal.guestbook' doesn't exist query: SELECT COUNT(*) FROM guestbook WHERE recipient = 0 in D:\Inetpub\royal-scouts.com\sites\all\modules\guestbook\guestbook.module on line 341.
* user warning: Table 'royal.guestbook' doesn't exist query: SELECT g.*, u1.name, u1.data, u1.picture, u2.name as commentby FROM guestbook g LEFT JOIN users u1 ON g.author = u1.uid LEFT JOIN users u2 ON g.commentauthor = u2.uid WHERE g.recipient = 0 ORDER BY g.created DESC LIMIT 0, 20 in D:\Inetpub\royal-scouts.com\sites\all\modules\guestbook\guestbook.module on line 341.

What can be done to get the guestbook module working? Or is there an alternative module for a guestbook function.
Many thanks for any help.

#1

sun - January 2, 2009 - 16:39
Category:bug report» support request
Status:active» fixed

The error message indicates that Guestbook's database table is missing.

Please completely disable and uninstall the Guestbook module. Afterwards, re-install it.

#2

drupal4normi - January 2, 2009 - 18:50

Thank you for your answer :)

Yes, I tried this already (disable and uninstall), because I have seen the hint.
But when I ativate the Guestbook module again, then comes:

user warning: BLOB/TEXT column 'message' can't have a default value query: CREATE TABLE guestbook ( `id` INT unsigned NOT NULL auto_increment, `recipient` INT unsigned NOT NULL DEFAULT 0, `author` INT unsigned NOT NULL DEFAULT 0, `anonname` VARCHAR(128) DEFAULT NULL, `anonemail` VARCHAR(128) DEFAULT NULL, `anonwebsite` VARCHAR(128) DEFAULT NULL, `message` TEXT NOT NULL DEFAULT '', `commentauthor` INT unsigned NOT NULL DEFAULT 0, `comment` TEXT NOT NULL DEFAULT '', `created` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (id), INDEX recipient (recipient), INDEX commentauthor (commentauthor), INDEX created (created) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in D:\Inetpub\royal-scouts.com\includes\database.inc on line 515.

#3

sun - January 2, 2009 - 19:29

I believe this error is already fixed in the latest development snapshot (both in 1.x and 2.x).

#4

drupal4normi - January 2, 2009 - 21:47

Cool, I tried guestbook-6.x-2.x-dev.tar.gz and it works.

Many thanks for that hint :)

#5

drupal4normi - January 5, 2009 - 23:49
Status:fixed» postponed (maintainer needs more info)

Gustbook didn't send any error message after installing.

But when I try an entry in the Website-guestbook. then comes following error:

user warning: Field 'comment' doesn't have a default value query: INSERT INTO guestbook (anonname, anonemail, anonwebsite, author, recipient, message, created) VALUES('test', 'test@test.de', 'www.test.de', 0, 0, 'test text test text test text test text test text ', 1231199247) in D:\Inetpub\royal-scouts.com\sites\all\modules\guestbook\guestbook.module on line 531.

Can you help me?

#6

sun - January 6, 2009 - 00:47
Title:Guestbook does not work properly» Missing default values for guestbook table
Version:6.x-1.1» 6.x-2.x-dev
Component:User interface» Code
Category:support request» bug report
Status:postponed (maintainer needs more info)» needs work

First iteration. Might already fix the bug, but needs a module update function to add the new default values for anon* columns.

AttachmentSize
guestbook.comment-default.patch 2.94 KB

#7

drupal4normi - January 7, 2009 - 21:37

Thank you a lot for helping me and readers who have the same problems.

I have Windows running with IIS and I don't know how to make a patch.

Can you tell me how to make the patch?

FYI: Gustbook can be accessed with www.royal-scouts.com/guestbook

#8

sun - January 8, 2009 - 05:30

You do not need to make a patch. Instead, download the patch that is attached to #6, and apply it to your Guestbook module. See http://drupal.org/patch/apply for further information.

#9

drupal4normi - January 15, 2009 - 11:41

Thank you for the information. But my knowledge is not enough to patch to solve the problem. I tried it but couldn't get any result.

So I will wait until there is a new update of the module available which I can just update within drupal.

#10

jason@olim.org - January 29, 2009 - 22:03

The patch is good. Thanks.

#11

boon4376 - October 26, 2009 - 03:07

I am still getting the error, I have tried the normal and DEV versions, as well as uninstalling / re-installing.

error:
user warning: Table 'drupal.guestbook' doesn't exist query: SELECT COUNT(created) FROM guestbook WHERE recipient = 4 AND created > 1256526196 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal\sites\all\modules\guestbook\guestbook.module on line 1004.

 
 

Drupal is a registered trademark of Dries Buytaert.