Blogstamp does not install correctly on 4.7.0

toremygg - July 1, 2006 - 11:06
Project:Blogstamp
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Matt Fleming
Status:closed
Description

Hi, I tried installing Blogstamp on my new Drupal site. Apologies if this report does not follow the standard format or is incorrect.

The install failed. Unfortunately I did not note the entire message. It did say something about the field size being too big, I believe, the maximum being 255. Something about using 'blob' instead? (Oh, I should have saved it...)

Now when I have the module enabled and open my site, I get loads of error messages in the blog block.

"user warning: Table 'mygland_drpl1.blogstamp' doesn't exist query: SELECT nid FROM blogstamp WHERE nid = 9 in /home/mygland/public_html/includes/database.mysql.inc on line 120.
user warning: Table 'mygland_drpl1.blogstamp' doesn't exist query: SELECT nid FROM blogstamp WHERE nid = 8 in /home/mygland/public_html/includes/database.mysql.inc on line 120.
user warning: Table 'mygland_drpl1.blogstamp' doesn't exist query: SELECT nid FROM blogstamp WHERE nid = 7 in /home/mygland/public_html/includes/database.mysql.inc on line 120.
user warning: Table 'mygland_drpl1.blogstamp' doesn't exist query: SELECT nid FROM blogstamp WHERE nid = 5 in /home/mygland/public_html/includes/database.mysql.inc on line 120.
user warning: Table 'mygland_drpl1.blogstamp' doesn't exist query: SELECT nid FROM blogstamp WHERE nid = 4 in /home/mygland/public_html/includes/database.mysql.inc on line 120.
user warning: Table 'mygland_drpl1.blogstamp' doesn't exist query: SELECT nid FROM blogstamp WHERE nid = 3 in /home/mygland/public_html/includes/database.mysql.inc on line 120.
user warning: Table 'mygland_drpl1.blogstamp' doesn't exist query: SELECT nid FROM blogstamp WHERE nid = 2 in /home/mygland/public_html/includes/database.mysql.inc on line 120.
user warning: Table 'mygland_drpl1.blogstamp' doesn't exist query: SELECT nid FROM blogstamp WHERE nid = 1 in /home/mygland/public_html/includes/database.mysql.inc on line 120. "

It would appear that the install didn't create the table it ws supposed to? Should the .install file have been modified to point to a certain DB? There was, as far as I could tell, no documentation accompanying the package.

Apologies for the incompleteness of this report.

#1

Matt Fleming - July 1, 2006 - 23:15

Hmm.. when did you get the package? I did have a problem in the install file at one point that would have given the column length error. Can you please post the blogstamp.install file you used?

#2

toremygg - July 2, 2006 - 11:02

Hi,

Attaching the file in question. I downloaded it on July 1st 1015 GMT according to the filestamp.

Cheers
Tore

AttachmentSize
blogstamp.install 674 bytes

#3

Matt Fleming - July 2, 2006 - 13:44
Assigned to:Anonymous» Matt Fleming
Status:active» fixed

Ok I fixed the install script so that the column type is now TEXT instead of a varchar(312) which is over the max length for mysql. Here is the table create script if you would like to build the table manually.

DROP TABLE IF EXISTS blogstamp;
CREATE TABLE blogstamp (
      nid int(10) unsigned NOT NULL,
created bigint(13) NOT NULL,
stamp text NOT NULL,
PRIMARY KEY  (nid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;

I think it will take a day for the changes to make it into the default download (I'm not sure when the packager runs). If you want to use the module install feature (instead of manually creating the table) make sure you delete the row from the system table before you try to re-enable the module (otherwise the install script isn't executed).

Btw, I also got rid of an extraneous debug message that displayed the stamp length.

#4

toremygg - July 2, 2006 - 15:36

Thanks for the speedy response. :o)

Now I just need to find out (n00b that I am) how to edit the system table. Anyone feel like enlightening me? Don't have shell / command line access to the server, as far as I'm aware (external host, not own server). Do I need to install something to access it?

Tore

#5

Matt Fleming - July 2, 2006 - 16:03

You could install the database (dba) module.. The latest cvs version seems to work just fine with 4.7..
http://drupal.org/node/8482/release
If don't have shell access, I think the dba module is probably a good one to have around. With it you can browse the system table and then delete the blogstamp entry in the table with a few clicks.

#6

toremygg - July 2, 2006 - 16:13

Stupid me. I have access to a DB admin module through my CPanel. *blush*

DB entry deleted.

Thanks :)

#7

Matt Fleming - July 6, 2006 - 16:06
Status:fixed» closed

#8

jmn - September 17, 2006 - 18:53

FYI: Problem appear to remain (or has returned) in the download version (I downloaded Sep 15).
I'll try the suggested fix in this thread manually.

#9

Matt Fleming - September 22, 2006 - 19:29

I would love to help you with this (and fix the bug) but I need to know a little bit more..

Which database are you using?
What is the error message?

#10

jmn - September 24, 2006 - 09:33

Sorry for the late reply.
I use mySQL.
Can't remember the exact error message, but it was 99% sure that it was the bug described here (MYSQL refused to create varchar() with index > 255).
I just applied the fix in #3 (create stamp as text instead). It worked and I'm happily up and running (See http://www.idekampanjer.se/ideord/cyborgmoln - in Swedish translation though.)

Only remaining problem as I understand, is that the "Download latest release (4.7.0, 13/07/2006 - 07:30, 10.38 KB)" still contain a blogstamp.install that use varchar(312) for mySQL. At least when I downloaded, and still there when I checked today.

Anyway. I'm happy, it works and I like the module. :-)

#11

Matt Fleming - September 25, 2006 - 00:34

D'oh! I forgot to checkin the latest changes on the 4.7 branch (it was on the HEAD only). It should be fine now. Thanks for posting the issue!

 
 

Drupal is a registered trademark of Dries Buytaert.