• m1sterd

    (@m1sterd)


    Hi,
    I created a plugin called Category Manager, that allows wp users to ordre, create, delete and edit categories among other things. It is still in beta version.

    A user who tried it informed me that he got the following error message when trying to create a new category:

    “You don’t have permission to access /wp-admin/”

    I dont quite understand why this happens, since to create a new category, my plugin uses quite the same code as WordPress :

    if ( !current_user_can(‘manage_categories’) )
    die (__(‘Cheatin’ uh?’));

    wp_insert_category($_POST);
    wp_redirect(‘edit.php?page=category-manager.php’);

    That’s all. Only the redirection changes. Any idea why one might get such an error? Maybe adding
    ‘require_once(admin.php)’ above this might do the trick. However I have no possibility to test since I dont have the error.

    The plugin’s page :

    https://www.bidibule.be/wordpress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter m1sterd

    (@m1sterd)

    Up

    JeremyVisser

    (@jeremyvisser)

    Please don’t bump threads, it stops them from appearing in the “no-replies” category, which means it will take longer to get back to you.

    As for the problem with the plugin, I’m not sure. I’ll try out the plugin myself and see if I have any trouble.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Permissions problem’ is closed to new replies.