I have some feedback regarding the "bible.install" code. When I tried to install the bible module it kicked back some MySQL errors saying the following:
* user warning: Column length too big for column 'context' (max = 255); use BLOB or TEXT instead query: CREATE TABLE IF NOT EXISTS bible_context ( vsid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, bid INT(10) UNSIGNED NOT NULL DEFAULT '0', book varchar(3) NOT NULL default '', chapter INT(4) UNSIGNED NOT NULL DEFAULT '0', verse INT(4) UNSIGNED NOT NULL DEFAULT '0', linemark varchar(1) NULL default '', context varchar(500) NOT NULL default '', PRIMARY KEY (vsid) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in /home/fatstudi/public_html/beta/includes/database.mysql.inc on line 172.
* Table installation for the Bible module was unsuccessful.
It's pretty easy to see what's going on. MySQL doesn't like how the "bible.install" script has defined the "context" column and it wants it to be "text" or "blob". I did a quick Google search and I found some sites that suggest that "varchar" can have a maximum of 255 characters, the install script reserves 500. As a result the third table "bible_context" never gets installed. So in my copy of the bible.install script I changed "content" from a varchar(500) to text(500). It seems to work. I'm not sure how this effects performance (I'm no DB expert).
I should also note that I had to do some more tweaking to get things setup properly. I basically had to nuke the partially created tables and reinstall the bible module. I've outlined my steps below for anyone else that's having difficulty.
If you tried to install the bible module and ran into problems, here are some steps to reinstall the module:
- If using MySQL 4.1.x (And possibly newer versions) you'll need to modify your bible.install script. You need to change the line where the "context" column is being created. Change it from a "varchar" to "text" (See attached revision)
- Go to the modules page and disable the "bible" module.
- With your bible.install file modified and the actual module turned off, you'll need to clean things up before you can reinstall the module. You need to nuke the old tables as the process likely didn't finish. I used phpMyAdmin. Feel free to use whatever admin tool you want. I recommend dropping any tables created by the script (e.g. "bible_book_name", "bible_list").
- Next you need to navigate to the "system" table in you database where Drupal stores information on all the modules. You need to nuke the row reference to the bible module so that the bible.install script that we fixed can run again. Search for a row with the name "bible" and a type "module." Drop this row.
- Upload your modified bible.install file.
- Go to the modules page and enable the bible module. You should see a successful install confirmation at the top of the screen.
Thank you for writing this module. I look forward to contributing as time allows.
Comments
Comment #1
Watchkeeper commentedThanks a lot for this, strayhand. You've pulled me out of a hole. I should have thought the module authors would thank you, too, and give some sort of explanation.
Comment #2
Leeteq commentedFYI - This is fixed in the latest version (not sure which earlier versions also includes the fix.
Comment #3
Leeteq commentedHmmm, maybe it should stay open a bit longer.
Comment #4
Kriss-dupe commentedBeen here too long, clearing up for efficiency.