• Resolved kisabelle

    (@kisabelle)


    Hi, I’m having a problem getting Slimstat to track anything.

    Previously it was tracking only 1 out of many users I need it to track, so I tried uninstalling, deleting the database tables and re-installing it. Now it won’t track anything at all! I’m at a loss as to what to do, I’m hoping you can help me figure out why it’s not working.

    I’ve been poring through the settings, and I checked the Knowledge Base and didn’t find anything that could point me in the right direction. I have tried disabling every other plugin and it still won’t track anything, I am also not using any caching plugins.

    the URL is https://pixeldesigns.ca/files/ibd/

    Thanks for your help!

    Katrina

    https://www.ads-software.com/plugins/wp-slimstat/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Jason Crouse

    (@coolmann)

    Hi,

    you have some other plugin (or server setting) preventing the tracker from accessing admin-ajax.php. When that resource is accessed, the server redirects the browser to the homepage. You may want to look into why this is happening.

    Best,
    Camu

    Thread Starter kisabelle

    (@kisabelle)

    Hi camu,

    When I navigate to https://pixeldesigns.ca/files/ibd/wp-admin/admin-ajax.php I get a 0, is that supposed to happen? Just trying to figure out if I can use that as a way to tell if it’s not working..

    Thread Starter kisabelle

    (@kisabelle)

    I also wanted to note that I am able to successfully access admin-ajax.php with a jquery ajax call in my theme – does that shed any light on the situation??

    Thread Starter kisabelle

    (@kisabelle)

    Hi camu,

    I am actually getting some data now, not sure why it wasn’t working yesterday afternoon, but it now seems to only track 1 specific user.. do you know what could be causing this?

    thanks!

    Thread Starter kisabelle

    (@kisabelle)

    I just want to note that I planned on purchasing 2 of the add-ons but I am unsure of whether that will happen if I can’t get this resolved.

    Plugin Author Jason Crouse

    (@coolmann)

    @kisabelle, please go to Settings > Advanced and set Enable CDN to No. See if that solves the problem. Our CDN provider is updating the tracker on their network, and the propagation might take a few hours.

    Thread Starter kisabelle

    (@kisabelle)

    Thanks – I have changed the setting and will report back in a little while.

    Plugin Author Jason Crouse

    (@coolmann)

    Beautiful!

    Thread Starter kisabelle

    (@kisabelle)

    PROBLEM RESOLVED

    I have managed to narrow down the problem, hooray!

    Issue: WP Slimstat had no data to display, due to slimstat not having access to the admin-ajax.php file.

    Cause: A code in functions.php to prevent access to the wordpress admin area to non-admin users was preventing any access to the admin-ajax.php file except when the logged in user had admin privileges.

    Offending code:

    add_action( 'admin_init', 'redirect_non_admin_users' );
    /**
     * Redirect non-admin users to home page
     */
    function redirect_non_admin_users() {
      if ( ! current_user_can( 'manage_options' ) && '/wp-admin/admin-ajax.php' != $_SERVER['PHP_SELF'] ) {
        wp_redirect( home_url() );
        exit;
      }
    }

    I have replaced the code with the following:

    add_action( 'init', 'blockusers_init' );
    
    function blockusers_init() {
      if ( is_admin() && ! current_user_can( 'administrator' ) &&
       ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
        wp_redirect( home_url() );
        exit;
      }
    }

    @camu I really appreciate your help with this. As I suspected it was a problem with the theme I built and no fault of the plugin, I just needed some help with where to look!

    Great job with this plugin.

    Plugin Author Jason Crouse

    (@coolmann)

    A vote for Slimstat would be a nice way to say thank you ??

    Thread Starter kisabelle

    (@kisabelle)

    Absolutely!

    Plugin Author Jason Crouse

    (@coolmann)

    You’re awesome. Much appreciated.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘No Data to Display’ is closed to new replies.