WordPress.org

Forums

WP Slimstat
[resolved] Error "SlimStatParams is not defined" (18 posts)

  1. Lwangaman
    Member
    Posted 2 years ago #

    With the latest update to SlimStat, I get the error message in the Chrome Console:
    Uncaught ReferenceError: SlimStatParams is not defined wp-slimstat.js:1
    I notice this error doesn't show up on wp-admin, only on the frontend.

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

  2. pepe
    Member
    Posted 2 years ago #

    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.

  3. camu
    Member
    Plugin Author

    Posted 2 years ago #

    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:

    http://www.duechiacchiere.it/contatto

    Thanks,
    Camu

  4. camu
    Member
    Plugin Author

    Posted 2 years ago #

    @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!

  5. Lwangaman
    Member
    Posted 2 years ago #

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

  6. camu
    Member
    Plugin Author

    Posted 2 years ago #

    Great!

  7. pepe
    Member
    Posted 2 years ago #

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

  8. camu
    Member
    Plugin Author

    Posted 2 years ago #

    @Pepe have you disabled the CDN?

  9. pepe
    Member
    Posted 2 years ago #

    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.

  10. pepe
    Member
    Posted 2 years ago #

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

  11. camu
    Member
    Plugin Author

    Posted 2 years ago #

    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

  12. pepe
    Member
    Posted 2 years ago #

    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?

  13. pepe
    Member
    Posted 2 years ago #

    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.

  14. camu
    Member
    Plugin Author

    Posted 2 years ago #

  15. camu
    Member
    Plugin Author

    Posted 2 years ago #

    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);
  16. pepe
    Member
    Posted 2 years ago #

    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?

  17. pepe
    Member
    Posted 2 years ago #

    So this issue (the scripting breakage) is resolved for me, but not the Right Now issue. Thanks!

  18. camu
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, that's the ID of your pageview.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic