WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Error "SlimStatParams is not defined"

[Resolved] Error "SlimStatParams is not defined"

Viewing 15 replies - 1 through 15 (of 17 total)
  • I’ve got the same problem. There is something wrong with wp-slimstat.js. Unfortunately, I’m a bit stumped what SlimStatParams var SlimStat =... is supposed to be.

    Plugin Author Jason Crouse

    @coolmann

    Hi there,

    let’s work together on trying to catch this bug. I have a new beta ready for testing, would you help me test it and see how it goes?

    Contact me with your name and a reference to this post:

    la buca delle lettere

    Thanks,
    Camu

    Plugin Author Jason Crouse

    @coolmann

    @all,

    a new version has just been released, which fixes the problem according to my tests. Please feel free to upgrade and report back to confirm that the issue is now resolved.

    Thank you,
    Camu

    PS: a vote for my plugin would be a nice way to show your appreciation!

    Yes that fixes for me! That was quick thanks, I was gonna help you beta test but you were quicker!

    Plugin Author Jason Crouse

    @coolmann

    Great!

    2.9.1 is still broken for me (even with JavaScript Mode disabled).

    Plugin Author Jason Crouse

    @coolmann

    @pepe have you disabled the CDN?

    I’ve managed to install the new release on my development machine. It does not work at all, even with JS disabled I get no tracking.

    With FireBug’s console window, I was able to determine that wp-slimstat.js.php returns -110 : invalid public key.

    Since 2.9, wp-slimstat also completely breaks javascript if W3TC’s “minify” feature is enabled.

    When JS mode is enabled, wp-slimstat-js.php returns -203 : Visit not tracked

    Plugin Author Jason Crouse

    @coolmann

    Hi Pepe,

    -203 means that the WP SlimStat thinks that the IP address of your visitors is not correct, for some reason.

    What’s the URL of your site, again?

    Thanks,
    Camu

    That’s the local dev install, so I guess it gets 127.0.0.1 – the -203 would be sort of OK then for this case. But what’s going on when JS mode is disabled?

    What’s the WP handle of your JS file? I think I’ve got an idea why things completely break on the production site. I’ve got minification enabled (W3TC minify for HTML and inline JS and Script Optimizer for general JS and CSS). I guess the minification routine doesn’t like the embedded VBScript.

    Plugin Author Jason Crouse

    @coolmann

    Plugin Author Jason Crouse

    @coolmann

    The handle is wp_slimstat:

    wp_register_script('wp_slimstat', plugins_url('/wp-slimstat.js', __FILE__), array(), self::$version, true);
    wp_enqueue_script('wp_slimstat');
    
    // $params is defined and populated
    
    wp_localize_script('wp_slimstat', 'SlimStatParams', $params);

    Yeah, I don’t use W3TC minify for JS files because I had some problems in the past. I’ve added wp_slimstat as an exempted file and now my scripting works again. Visits are tracked again in “Spy View”, but not in the “Right Now” tab. The result of the wp-slimstat-js.php call is a four digit hex code, does that seem right?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Resolved] Error "SlimStatParams is not defined"’ is closed to new replies.