• Resolved scorpress

    (@scorpress)


    I have installed version 2.5.1 of WP SlimStat, and it seems to be tracking my local hits just fine. However, country detection is not working. All the traffic appears to come from unknown countries. Looking at the wp_slim_stats table in phpMyAdmin tells me that the country column is always set to “xx”. The searchterms column is always empty. I tried my IP address in MaxMind; it does identify my country correctly.

    I have not done any customization of the plugin other than to install and activate it. I made sure that wp_footer is called in footer.php.

    Has someone seen this behaviour? Am I missing something?

    http://wordpress.org/extend/plugins/wp-slimstat/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter scorpress

    (@scorpress)

    I solved my own problem by changing the SQL code in wp-slimstat.php for creating the wp_slim_countries table to the following:

    $country_table_sql =
            "CREATE TABLE IF NOT EXISTS {$wpdb->base_prefix}slim_countries (
                    ip_from INT UNSIGNED DEFAULT 0,
                    ip_to INT UNSIGNED DEFAULT 0,
                    country_code CHAR(2) DEFAULT '',
                    CONSTRAINT ip_from_idx PRIMARY KEY (ip_from, ip_to)
            )$use_innodb";

    Apparently MySQL 5.0.92 did not like the original SQL code and never created the wp_slim_countries table when the plugin was activated.

    Plugin Author Jason Crouse

    (@coolmann)

    Thank you, noted! It’s weird that after almost 2 years of my plugin being used, this error is coming out now. I will research the issue and, if the case, update my code.

    Cheers,
    Camu

    It happened to me as well. MySQL 5.0.92 in use.

    I had just started noticing that country data wasn’t being recorded, and then I saw this topic. Thanks scorpress!

    Plugin Author Jason Crouse

    (@coolmann)

    It seems like this is a growing issue, since more and more people are starting to tell me about it. I will release a new version with this code asap!

    Camu

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP SlimStat] Country detection is not working’ is closed to new replies.