WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack Post Statistics Link
You do not have sufficient privileges to access this page. (7 posts)

  1. elistr
    Member
    Posted 2 years ago #

    Hi, I just installed your plugin and I have the column "Stats" in posts. But when I click on a symbol of stats it shows me something like this (translation from my language) You do not have sufficient privileges to access this page.

    Could anyone help me?

    http://wordpress.org/extend/plugins/jetpack-post-statistic-link-plugin/

  2. jcrawfor74
    Member
    Plugin Author

    Posted 2 years ago #

    Hi elsitr,

    The Jetpack Post statistic Link just creates a link to your existing Jet Pack statistics,(but for each post)

    You must first install the Jetpack Plugin on your site?
    I assume you have done this?
    If not install Jetpack and then this plugin will work.
    http://wordpress.org/extend/plugins/jetpack/

    This plugin just provides an alternative way to get to your post stats.

    If you have jetpack installed, and it is still not working could you do the following.

    1. Go to your Site Stats page and click on a link to the statistic for one of your posts (icon in your "Top Posts & Pages" section).
    Note the URL it generates.
    Does this work?
    If this doesn't work then you have a problem with your jetpack installation, and you might like to try re-installing Jetpack. If its still not working then this is beyond my knowledge to fix.

    2. Go to the the Post Admin page and click on one of my links, compare the URL.

    At the time I wrote the plugin the URL's contained a &blog=nnnnn parameter on the URL, which I replicated in the Post statistic link plugin. This is done by reading a value out of your database and parsing the string.

    Now the URL's for jetpack don't seem to need this &blog=nnnn parameter so try removing the &blog=nnn.

    Let me know how you go

  3. jcrawfor74
    Member
    Plugin Author

    Posted 2 years ago #

    Just released an update 1.1.0 which removes the need for the &blog=nnn.
    The other thought is it may be language specific. You mention the error was translated from your language. If the url for you jetpack stats is language specific the &posts=xxx in the URL may need to change to whatever posts= in your language.

    again let me know how you go

  4. theonetruebix
    Member
    Posted 1 year ago #

    FWIW, this might actually be the plugin calling the Site URL instead of the WordPress URL. The links are useless on my install because it tries to load a URL that starts domain/wp-admin when my install is in domain/wordpress/wp-admin instead. So what I get is a 404 error.

  5. jcrawfor74
    Member
    Plugin Author

    Posted 1 year ago #

    Hi theonetruebix,

    You may be onto something.
    Could you confirm this is the problem by trying the following:

    1. Go to the plugins page
    2. Choose edit, you will get php code for the plugin.
    3. Scroll all the way to the bottom and find the line that says:
    $url = '/wp-admin/admin.php?page=stats&view=post&post=' . $id;
    4. Add /wordpress to the front of the URL like so.
    $url = '/wordpress/wp-admin/admin.php?page=stats&view=post&post=' . $id;
    5. Click "Update file"

    This should be a quick work around for the problem you have identified.

    If you can confirm this works, I will create a new version of the plugin with a settings page.

    The settings page would allow you to specify the relative path to the wp-admin folder. (note I have never created a settings page.. so it should be fun to try to implement)

    Thanks

  6. jcrawfor74
    Member
    Plugin Author

    Posted 1 year ago #

    Hi theonetruebix,

    A follow up from the above suggestion. I just went through developing a setup page, which I got working and then I found a better solution requiring no user input.

    If you could follow these steps (very similar to before)

    1. Go to the plugins page
    2. Choose edit on the plugin in question, you will get php code for the plugin.
    3. Scroll all the way to the bottom and find the line that says:
    $url = '/wp-admin/admin.php?page=stats&view=post&post=' . $id;
    4. Replace this line with the following 2 lines:

    $path = get_bloginfo('wpurl');
    $url =  $path . '/wp-admin/admin.php?page=stats&view=post&post=' . $id;

    5. Click "Update file"

    If this works I will release this in a version 1.2.

  7. jcrawfor74
    Member
    Plugin Author

    Posted 1 year ago #

    Version 1.2 released which includes the changes listed above

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic