Support » Plugins » WP-shortstat 1.3 and WP 2.0

  • Hi,

    according to the compatibily list “WP-ShortStat 1.3” should work with WP 2.0.
    But when I open the “shortstat”‘s in dashboard I get the following message:

    Since Fatal error: Cannot access empty property in /<path>/wp-content/plugins/wp-shortstat.php on line 771

    Any ideas? Does WP-ShortStats run on one of your 2.0 installations? Can someone advise another statistics plugin which similar information that works with WP 2.0?


Viewing 13 replies - 1 through 13 (of 13 total)
  • I have read this can be fixed by changing:

    Now…I am having my own problem. I have been using wp-shortstat for quite while now. I have even heavily modified my own version add new stats for search engines, top pages for the day, etc.
    I upgraded to WP2 yesterday, and wp-shortstat stopped logging traffic to my site. I switched to the original version, and same thing. The stats display page works fine. I dropped the tables, and it recreated fine. Everything seems to be working fine except it is not logging any visits to my site. It is like the track hook is not being triggered. Anybody else seeing this?

    update: I just read else where that wp-shortstat worked fine with 2.0, but stopped working with wp 2.0.1. So maybe the shutdown hook got toasted in 2.0.1?

    The 2.0.1 Update broke WP-shortstat 1.3.

    It looks like there is still a conflict with the Google Sitemap plugin.

    See HappyArts Blog.

    Any ideas where 2.0.1 messes up wp-shortstat? The hooks it uses look pretty standard to me.

    Okay, I fixed the wp-shortstat problem. Here’s the deal: in order to avoid recording admin page hits, the plugin was testing whether or not a function named “check_admin_referer” was defined. That worked until WP 2.0.1, when that function moved from the admin functions to pluggable functions, meaning it’s now always defined.

    To fix it, I replaced the test for that function with a test for this function: “user_can_access_admin_page,” which should work even for WP 1.5.

    The bottom line: to fix it, swap out line 13 of the plugin like so.

    < if (function_exists('check_admin_referer')) {
    > if (function_exists('user_can_access_admin_page')) {

    In other words, the first few lines of the plugin should now look like this:

    Plugin Name: WP-ShortStat
    Plugin URI:
    Description: Track your blog stats. Based on <a href="">Shaun Inman's ShortStat</a>.
    Version: 1.3
    Author: Jeff Minard
    Author URI:

    if( !function_exists('is_admin_page') ) {
    function is_admin_page() {
    if (function_exists('user_can_access_admin_page')) {
    return true;
    else {
    return false;

    Or, just check if /wp-admin is in the current request… That’d work too.


    Or just use the actual Shortstat and not the plugin.

    I just wanted to confirm filosofo’s fix. wp-shortstat started working.

    I switched out the two lines and started getting the following error:

    Parse error: syntax error, unexpected T_DNUMBER in /wp-content/plugins/wp-shortstat.php on line 98

    I swapped the two lines back and still got the error. So I deleted the plug-in. I also have the Google Sitemap file. So what’s the answer? Thanks for any help.

    I still have to comment out line 95 (with above fix) to get shortstat 1.3 to work.

    // || check_admin_referer()

    And that’s regardless of whether I use check_admin_referer or user_can_access_admin_page (On either line 13 or 95).

    Commenting out the line (88 in my case) worked.

    filosofo fix is perfect. The stats on my blog started working! Thanks.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘WP-shortstat 1.3 and WP 2.0’ is closed to new replies.