"Oops! You do not have sufficient permissions to access this page."

  • Praveen
    Praveen
    Senior Member
     
    216 points

    I’m getting below permission errors for ajax requests.

    “Oops! You do not have sufficient permissions to access this page.”

    I’m using 4.5 version.

    This is occurring mainly for ajax requests.


    Mark Fail
    Mark Fail
    Super Guru
     
    12,228 points

    4.5… please update


    Praveen
    Praveen
    Senior Member
     
    216 points

    Hi Mark,

    Even after updating to 5.3 i’m getting the same permission error for ajax requests :(


    Praveen
    Praveen
    Senior Member
     
    216 points

    Any update?


    Praveen
    Praveen
    Senior Member
     
    216 points

    @Mark, any update on this ajax permission issue?


    Mark Fail
    Mark Fail
    Super Guru
     
    12,228 points

    ajax request using what? which plugin?


    Praveen
    Praveen
    Senior Member
     
    216 points

    Using twitter posts, its giving permission error for ajax calls.


    Richard Bonk
    Richard Bonk
    Super Guru
     
    2,739 points

    What is that plugin supposed to do?
    Also If you get error from the plugin, you should contact the plugin creator.


    Praveen
    Praveen
    Senior Member
     
    216 points

    @Richard, yes i contacted the plugin developer. But again he blamed it with the theme :(


    Gino
    Gino
    Newbie
     
    11 points

    Hi,

    I am facing this issue too with multi rating pro. The plugin author have helped me to update the code in BT framework.

    Please check if this can help any of you who are facing this issue.

    BT/framework/class/class_admin.php line 1299

    Original code from the theme

    // FIX FOR ADMIN QUERY
    if(isset($_GET[‘action’]) ){ return; }

    if (strpos(strtolower($_SERVER[‘REQUEST_URI’]), ‘/wp-admin’) !== false && $userdata->ID) {

    $userdata = wp_get_current_user();

    if( !user_can($userdata->ID, ‘administrator’) && !user_can($userdata->ID, ‘contributor’) && !user_can($userdata->ID, ‘editor’) ){

    wp_die(__(‘Oops! You do not have sufficient permissions to access this page.’));

    }
    }

    Multi Rating Pro submits a HTTP POST AJAX request ($_POST) and not a HTTP GET ($_GET).
    In order to support both $_GET and $_POST.

    if(isset($_GET[‘action’]) || isset( $_POST[‘action’] ) ){ return; }

    Thanks for the support from multi rating pro author.


    Delali
    Delali
    Newbie
     
    32 points

    I’m getting this horrid error too. I tried 4 different ratings plugins and get this error every time. But the plugins work fine for my other site using a non-premiumpress theme. Obviously it’s a problem with the theme. Unfortunately this Multi Ratings Pro fix doesn’t work for my rating plugin.
    I’m dying here. 2 days straight trying to find a solution. Seriously, from morning to night looking for help. The plugin author was so patient and so helpful, but it’s not a problem with his plugin. I haven’t gotten any responses posting in this forum for this issue, so I hope I get a quick response to my ticket. I think spending over 30 hours on one issue is ridiculous.


    Delali
    Delali
    Newbie
     
    32 points

    For anyone who has this issue with wp-postratings plugin, here is what worked for me.

    Open wp-content/themes/BT/framework/class/class_admin.php

    After this line: // FIX FOR ADMIN QUERY
    You’ll see: if( !user_can($userdata->ID, ‘administrator’) && !user_can($userdata->ID, ‘contributor’) && !user_can($userdata->ID, ‘editor’)

    Just add the user levels you need, like subscriber, author, etc.


    Josh
    Josh
    Super Guru
     
    13,887 points

    Thanks for sharing :)


    Clive
    Clive
    Super Guru
     
    1,819 points

    Well done Josh :)


    Hemanta Chakladar
    Hemanta Chakladar
    Super Guru
     
    1,700 points

    Hey, we can’t run any ajax call from non-admin user, because it always says,

    “Oops! You do not have sufficient permissions to access this page.”

    Are you going to fix it ?


Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.