• Resolved oshingler

    (@oshingler)


    The 2.4 update of wp-slimstat has proper broken my sites! I’d been using the count_raw_data() method from wp_slimstat_view which I believe has now been removed. Is there an alternative way of retrieving this data now that the function has gone or can it be put back? I’d been using this code to provide a hit counter in my themes:

    require_once(WP_PLUGIN_DIR.’/wp-slimstat/view/wp-slimstat-view.php’);
    $wp_slimstat_view = new wp_slimstat_view();
    $totalvisits = $wp_slimstat_view->count_raw_data();
    echo $totalvisits;

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter oshingler

    (@oshingler)

    As an update to this, I’ve also noticed that a great deal of the methods called by the WP-slimstat-shortcodes plugin are also gone, so throw up errors too. I can’t see a simple solution to this problem that doesn’t involve creating a custom report or plugin to add in these missing functions. Can they not be added back please?

    Plugin Author Jason Crouse

    (@coolmann)

    Hi there,

    as I specified in the CHANGELOG, the library has been almost totally rewritten, and many functions have been replaced by more generic ones. Like count_raw_data(), which is now:

    $wp_slimstat_view->count_records('1=1', '*', false)

    Here is a brief description of its parameters:

    1. what records to count (i.e. the WHERE clause in the corresponding SQL query). If you want to count them all, just say 1=1
    2. what field to count (i.e. the field that goes in the SELECT part of the query). In general, * is more than enough
    3. count only current month?

    Hope this helps!

    As for WP SlimStats Shortcodes, I will update it as soon as possible, to use the new methods included in the updated library.

    PS: a vote for my plugin would be greatly appreciated!

    Camu

    Thread Starter oshingler

    (@oshingler)

    Hi Camu,

    Thanks for the reply, it was very helpful and it’s working great now.

    Since the update most of the slimstat widgets (recent keywords, traffic sources overview, etc…) show the text “No data to display” and the Raw Data table also shows this message even though it says there should be records to display. It is clearly keeping track of the hits to the site as numbers are changing on the front page, but none of the reports are saying there is any data. Is this a known bug?

    And I’ve already given you 5 stars!

    Thanks,
    Oli

    Thread Starter oshingler

    (@oshingler)

    I’m going to reply to my own with a fix here… I should have read the CHANGELOG properly- I did this to fix the No data to display problem:

    Geolocation: updated the information in the CSV file included (May 2011, 146219 rows). Go to Options > Maintenance > Reset Ip-to-Countries. Then deactivate/reactivate WP SlimStat to import the new file.

    Plugin Author Jason Crouse

    (@coolmann)

    So it’s working fine now? Wonderful news, my friend ??

    Best,
    Camu

    Camu,
    I to am not getting any data in the recent keywords, recent users, and other widgets.
    Also when I goto the Options section and try to click any of the tabs like Maintenance, Views, Filters,Permissionms or Support, i get the following message:
    You do not have sufficient permissions to access this page.

    Not sure what happened but this just happened in 2.4

    Plugin Author Jason Crouse

    (@coolmann)

    Smsulliva,

    please try manually uploading my plugin to your server, it seems like some files were not properly updated. Also, deactivate/activate the plugin, after doing that. Let me know if this fixes your issue.

    Camu

    I deactivated/activated the plugin and everything started to work except I still cannot goto the any of the option pages. I still get the “You do not have sufficient permissions to access this page.”

    Plugin Author Jason Crouse

    (@coolmann)

    Good. Next time please read the installation instructions ?? Did you try to manually update the plugin downloading the ZIP file and FTP’ing its content to your server? That may solve the other problem.

    Camu

    Yes I did manually update the plugin. Did not fix the issue.

    Plugin Author Jason Crouse

    (@coolmann)

    Okay, if you have access to phpmyadmin, please remove the row where option_value = ‘slimstat_can_manage’ from your wp_options table (or whatever your WordPress prefix is).

    Plugin Author Jason Crouse

    (@coolmann)

    oshingler,

    a vote for my plugin would be a nice way to thank me for helping you solve your problem ??

    Camu

    I just went to phpmyadmin and there is no record in the wp_options table that has a row where option_value = ‘slimstat_can_manage’

    Plugin Author Jason Crouse

    (@coolmann)

    I’m sorry, it’s 10PM so my brain cells are already asleep ?? I meant slimstat_can_admin.

    Nope. I did a search for anything like slimstat and came up zero rows in that table

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Broken sites: No more count_raw_data?’ is closed to new replies.