The module installed the row in the system table but it failed creating tables.
From log reports
PHP
Invalid default value for 'id' query: CREATE TABLE logwatcher_settings ( `id` INT unsigned NOT NULL auto_increment DEFAULT '', `type` VARCHAR(30) DEFAULT NULL, `timeframe` VARCHAR(255) DEFAULT NULL, `rows` MEDIUMINT DEFAULT NULL, `last_run` INT DEFAULT NULL, `active` TINYINT NOT NULL DEFAULT 1, PRIMARY KEY (id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/public_html/includes/database.inc on line 555.
BACKTRACE
Type: php
Invalid default value for 'id' query: CREATE TABLE logwatcher_data ( `id` INT unsigned NOT NULL auto_increment DEFAULT '', `job_id` INT unsigned DEFAULT NULL, `message` LONGTEXT DEFAULT NULL, `num` INT DEFAULT NULL, `last_referer` VARCHAR(128) DEFAULT NULL, `run_timestamp` INT DEFAULT NULL, `run_timeframe` VARCHAR(255) DEFAULT NULL, PRIMARY KEY (id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/public_html/includes/database.inc on line 555.
Backtrace:
trigger_error(array:a:2:{i:0;s:419:"Invalid default value for 'id' query: CREATE TABLE logwatcher_data ( `id` INT unsigned NOT NULL auto_increment DEFAULT '', `job_id` INT unsigned DEFAULT NULL, `message` LONGTEXT DEFAULT NULL, `num` INT DEFAULT NULL, `last_referer` VARCHAR(128) DEFAULT NULL, `run_timestamp` INT DEFAULT NULL, `run_timeframe` VARCHAR(255) DEFAULT NULL, PRIMARY KEY (id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */";i:1;i:512;})[database.mysqli.inc:128];
._db_query(array:a:1:{i:0;s:361:"CREATE TABLE logwatcher_data ( `id` INT unsigned NOT NULL auto_increment DEFAULT '', `job_id` INT unsigned DEFAULT NULL, `message` LONGTEXT DEFAULT NULL, `num` INT DEFAULT NULL, `last_referer` VARCHAR(128) DEFAULT NULL, `run_timestamp` INT DEFAULT NULL, `run_timeframe` VARCHAR(255) DEFAULT NULL, PRIMARY KEY (id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */";})[database.mysql-common.inc:42];
..db_query(array:a:2:{i:0;s:363:"CREATE TABLE {logwatcher_data} ( `id` INT unsigned NOT NULL auto_increment DEFAULT '', `job_id` INT unsigned DEFAULT NULL, `message` LONGTEXT DEFAULT NULL, `num` INT DEFAULT NULL, `last_referer` VARCHAR(128) DEFAULT NULL, `run_timestamp` INT DEFAULT NULL, `run_timeframe` VARCHAR(255) DEFAULT NULL, PRIMARY KEY (id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */";i:1;b:1;})[database.inc:65];
...update_sql(array:a:1:{i:0;s:363:"CREATE TABLE {logwatcher_data} ( `id` INT unsigned NOT NULL auto_increment DEFAULT '', `job_id` INT unsigned DEFAULT NULL, `message` LONGTEXT DEFAULT NULL, `num` INT DEFAULT NULL, `last_referer` VARCHAR(128) DEFAULT NULL, `run_timestamp` INT DEFAULT NULL, `run_timeframe` VARCHAR(255) DEFAULT NULL, PRIMARY KEY (id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */";})[database.inc:555];
....db_create_table(array:a:3:{i:0;a:0:{}i:1;s:15:"logwatcher_data";i:2;a:4:{s:6:"fields";a:7:{s:2:"id";a:6:{s:4:"type";s:6:"serial";s:4:"size";s:6:"normal";s:6:"length";i:10;s:8:"not null";b:1;s:7:"default";s:0:"";s:8:"unsigned";b:1;}s:6:"job_id";a:4:{s:4:"type";s:3:"int";s:4:"size";s:6:"normal";s:8:"unsigned";b:1;s:8:"not null";b:0;}s:7:"message";a:2:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";}s:3:"num";a:3:{s:4:"type";s:3:"int";s:6:"length";i:10;s:8:"not null";b:0;}s:12:"last_referer";a:3:{s:4:"type";s:7:"varchar";s:6:"length";i:128;s:8:"not null";b:0;}s:13:"run_timestamp";a:4:{s:4:"type";s:3:"int";s:4:"size";s:6:"normal";s:6:"length";i:11;s:8:"not null";b:0;}s:13:"run_timeframe";a:3:{s:4:"type";s:7:"varchar";s:6:"length";s:3:"255";s:8:"not null";b:0;}}s:11:"primary key";a:1:{i:0;s:2:"id";}s:6:"module";s:10:"logwatcher";s:4:"name";s:15:"logwatcher_data";}})[common.inc:3311];
.....drupal_install_schema(array:a:1:{i:0;s:10:"logwatcher";})[logwatcher.install:13];
......logwatcher_install(array:)[?:?];
.......call_user_func_array(array:a:2:{i:0;s:18:"logwatcher_install";i:1;a:0:{}})[module.inc:462];
........module_invoke(array:a:2:{i:0;s:10:"logwatcher";i:1;s:7:"install";})[install.inc:344];
........._drupal_install_module(array:a:1:{i:0;s:10:"logwatcher";})[?:?];
..........array_filter(array:a:2:{i:0;a:1:{i:0;s:10:"logwatcher";}i:1;s:22:"_drupal_install_module";})[install.inc:330];
...........drupal_install_modules(array:a:1:{i:0;a:1:{i:0;s:10:"logwatcher";}})[system.admin.inc:932];
............system_modules_submit(array)[form.inc:780];
.............form_execute_handlers(array)[form.inc:420];
..............drupal_process_form(array)[form.inc:119];
...............drupal_get_form(array:a:1:{i:0;s:14:"system_modules";})[?:?];
................call_user_func_array(array:a:2:{i:0;s:15:"drupal_get_form";i:1;a:1:{i:0;s:14:"system_modules";}})[menu.inc:348];
.................menu_execute_active_handler(array:)[index.php:18];
..................index.php
Comments
Comment #1
deekayen CreditAttribution: deekayen commentedJust naming that column as id isn't very descriptive, either. Is id reserved in sql anyway and therefore require backticks when querying for it?
Comment #2
Bastlynn CreditAttribution: Bastlynn commentedid was what the version for Drupal 5 called it. I wanted to make sure there was something of an upgrade path from the old version to the new without mucking around too much in the table. I think I see where the problem is in the schema so expect an update shortly.
Comment #3
Bastlynn CreditAttribution: Bastlynn commented@modiphier http://drupal.org/node/961382 should work much better for you - please let me know if it doesn't. Many apologies for that bug.
re: moving away from using id as the primary key - I'd like to pick that up for the next version along with any changes from kristofvanroy if you're comfortable with that?
Comment #4
modiphier CreditAttribution: modiphier commentedHello Bastlynn,
Yes, thank you! It installed without error. I am just creating a couple of reports and well i don't want to ask yet without going to the module homepage but I am not sure if I know how to add the access rule to send the report via email to me.
Thanks again.
Comment #5
Bastlynn CreditAttribution: Bastlynn commentedYou want to create a role to receive reports. Go to http://yoursitedomaingoeshere.com/?q=admin/user/roles
Then click "edit permissions" for the role you created.
Look at the permissions listed for "logwatcher module" - you'll see "administer logwatcher". Check that off for that role, then scroll down and click "Save Permissions" to save the change.
Now that you have a role created with the right permission to receive the emails - anyone you add to that role will get notified. Click on My Account -> Edit to get to the page to add yourself to that role.