Support » Plugin: Hotspots Analytics » Does not work (table missing?)

  • From another thread (‘View Heatmap’ Button Not Working) it seems there should be a table “wordpress_ha_user_event”. I have only one single table “wordpressha_user”. Data is recorded in there, but in the interface there are no heatmaps, no data, nothing.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author dpowney

    (@dpowney)

    Hi there,

    Try to deactivate and then activate the plugin again. This might be specific to your environment. What version of PHP and WordPress do you have?

    Thanks,
    Daniel

    Thread Starter crispress

    (@crispress)

    Hi Daniel, thanks for your reply. I’m using WP 4.6.1 and PHP 5.6.
    I already tried to deactivate/activate. Still, the only table that was created is wordpressha_user.
    Same if I delete/re-download the plugin.

    I have 30 plugins and they create their tables without issues. Also my WP is running great otherwise, no problems.
    Is there maybe some debug/log option I could run?

    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 );

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does not work (table missing?)’ is closed to new replies.