Installation issues when InnoDB is the default database engine
I thought this might help others that have experienced the issue noted in the threads listed below:
http://forums.appthemes.com/empty-table-14327/
http://forums.appthemes.com/error-no...-14295/page-2/
If you have your default MySQL database engine set to InnoDB, the "wp_*cp_ad_fields" table will not get populated.
Although the default WordPress install will run using InnoDB as the engine (may be slower), you can change it after the fact by issuing the following command:
ALTER TABLE t ENGINE = MYISAM where t is(are) the table name(s)
The correct fix is for all plugin, theme, and widget developers that create tables to add the engine type to their table create statements.
In the case of ClassiPress, one of the create statements should look like this:
(note the engine clause)
Code:
$sql = "CREATE TABLE IF NOT EXISTS ". $wpdb->prefix . "cp_ad_forms" ." (
`id` INT(10) NOT NULL auto_increment,
`form_name` VARCHAR(255) NOT NULL,
`form_label` VARCHAR(255) NOT NULL,
`form_desc` LONGTEXT,
`form_cats` LONGTEXT NOT NULL,
`form_status` VARCHAR(255) DEFAULT NULL,
`form_owner` VARCHAR(255) DEFAULT NULL,
`form_created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`form_modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY id (`id`)) ENGINE=MyISAM $collate;";
By the way, the error in the ClassiPress install is due to the install-script.php trying to insert an empty string into an integer field (field_req) starting at row 3. This will work in a MyISAM table but not an InnoDB. I don't know if there are other errors, but this is a "show stopper!"
If you don't want to change your default engine (I don't on my dev system), you can grab the erring insert statement out of the error log and issue it in phpMyAdmin (or the cl) after changing the ClassiPress tables to MyISAM.
Hope that helps...
Darrell