kilbymiz
Forum Replies Created
-
Forum: Plugins
In reply to: [Hotspots Analytics] Does not work (table missing?)I know you have probably moved on but for future reference and anyone else with same issue…..
For anyone only getting the ha_user table and not the other 3 tables the problem is probably your MySQL Engine is set to engine=MyIsam. 3 of the 4 Tables created during Activation use Index Keys which require ENGINE=InnoDB. Add ENGINE=InnoDB; to each of the last 3 tables.
in file: wp-content/plugins/hotspots/php/controllers/admin-controller.php
deactivate/activate plugin – everything should work fine// Create database tables
$query = ‘CREATE TABLE ‘.$wpdb->prefix.HA_Common::USER_TBL_NAME.’ (
‘.HA_Common::ID_COLUMN.’ int(11) NOT NULL AUTO_INCREMENT,
‘.HA_Common::IP_ADDRESS_COLUMN.’ varchar(255),
‘.HA_Common::SESSION_ID_COLUMN.’ varchar(255),
‘.HA_Common::USER_ROLE_COLUMN.’ varchar(255) DEFAULT “”,
‘.HA_Common::USERNAME_COLUMN.’ varchar(255) DEFAULT “”,
‘.HA_Common::LAST_UPDT_DATE_COLUMN.’ DATETIME,
PRIMARY KEY (‘.HA_Common::ID_COLUMN.’)
) ‘ . $charset_collate;
dbDelta( $query );$query = ‘CREATE TABLE ‘.$wpdb->prefix.ha_user_environment.’ (
‘.HA_Common::ID_COLUMN.’ int(11) NOT NULL AUTO_INCREMENT,
‘.HA_Common::USER_ID_COLUMN.’ int(11) NOT NULL,
‘.HA_Common::BROWSER_COLUMN.’ varchar(255),
‘.HA_Common::OS_COLUMN.’ varchar(255),
‘.HA_Common::DEVICE_COLUMN.’ varchar(255),
‘.HA_Common::LAST_UPDT_DATE_COLUMN.’ DATETIME,
PRIMARY KEY (‘.HA_Common::ID_COLUMN.’),
KEY ix_user_env (‘.HA_Common::USER_ID_COLUMN.’,’.HA_Common::BROWSER_COLUMN.’,’.HA_Common::OS_COLUMN.’,’.HA_Common::DEVICE_COLUMN.’)
) ENGINE=InnoDB;‘ . $charset_collate;
dbDelta( $query );// User event table
$query = ‘CREATE TABLE ‘.$wpdb->prefix.HA_Common::USER_EVENT_TBL_NAME.’ (
‘.HA_Common::ID_COLUMN.’ int(11) NOT NULL AUTO_INCREMENT,
‘.HA_Common::USER_ID_COLUMN.’ int(11) NOT NULL,
‘.HA_Common::USER_ENV_ID_COLUMN.’ int(11) NOT NULL,
‘.HA_Common::EVENT_TYPE_COLUMN.’ varchar(50) NOT NULL,
‘.HA_Common::URL_COLUMN.’ varchar(255) NOT NULL,
‘.HA_Common::X_COORD_COLUMN.’ int(11),
‘.HA_Common::Y_COORD_COLUMN.’ int(11),
‘.HA_Common::PAGE_WIDTH_COLUMN.’ int(11),
‘.HA_Common::RECORD_DATE_COLUMN.’ DATETIME,
‘.HA_Common::DATA_COLUMN.’ varchar(255),
‘.HA_Common::DESCRIPTION_COLUMN.’ varchar(255),
‘.HA_Common::LAST_UPDT_DATE_COLUMN.’ DATETIME,
PRIMARY KEY (‘.HA_Common::ID_COLUMN.’),
KEY ix_event (‘ . HA_Common::X_COORD_COLUMN . ‘,’. HA_Common::Y_COORD_COLUMN . ‘,’
. HA_Common::EVENT_TYPE_COLUMN . ‘,’ . HA_Common::PAGE_WIDTH_COLUMN . ‘,’
. HA_Common::URL_COLUMN . ‘,’ . HA_Common::USER_ENV_ID_COLUMN . ‘)
) ENGINE=InnoDB;‘ . $charset_collate;
dbDelta( $query );// Custom event table
$query = ‘CREATE TABLE ‘.$wpdb->prefix.HA_Common::CUSTOM_EVENT_TBL_NAME.’ (
‘.HA_Common::ID_COLUMN.’ int(11) NOT NULL AUTO_INCREMENT,
‘.HA_Common::EVENT_TYPE_COLUMN.’ varchar(255),
‘.HA_Common::DESCRIPTION_COLUMN.’ varchar(255),
‘.HA_Common::CUSTOM_EVENT_COLUMN.’ varchar(255),
‘.HA_Common::URL_COLUMN.’ varchar(255),
‘.HA_Common::IS_FORM_SUBMIT_COLUMN. ‘ tinyint(1) DEFAULT 0,
‘.HA_Common::IS_MOUSE_CLICK_COLUMN. ‘ tinyint(1) DEFAULT 1,
‘.HA_Common::IS_TOUCHSCREEN_TAP_COLUMN. ‘ tinyint(1) DEFAULT 0,
PRIMARY KEY (‘.HA_Common::ID_COLUMN.’),
KEY ix_custom_event (‘ . HA_Common::URL_COLUMN . ‘,’. HA_Common::EVENT_TYPE_COLUMN . ‘)
) ENGINE=InnoDB;‘ . $charset_collate;
dbDelta( $query );