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.

CommentFileSizeAuthor
#6 guestbook.comment-default.patch2.94 KBsun

Comments

sun’s picture

Category: bug » support
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.

drupal4normi’s picture

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.

sun’s picture

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

drupal4normi’s picture

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

Many thanks for that hint :)

drupal4normi’s picture

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?

sun’s picture

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 » bug
Status: Postponed (maintainer needs more info) » Needs work
StatusFileSize
new2.94 KB

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

drupal4normi’s picture

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

sun’s picture

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.

drupal4normi’s picture

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.

jason@olim.org’s picture

The patch is good. Thanks.

boon4376’s picture

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.

Zo1tar’s picture

For those having problems with the missing table.

I uninstalled it.

I found the "System Table Cleaner" Module and cleaned the database of Guestbook.

Then reinstalled the 6.x-2.x-dev version.

sun’s picture

Status: Needs work » Fixed

Thanks for reporting, reviewing, and testing! Committed to 2.x.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

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