MynaG's Bits n Bytes

08 Sep, 2009

Solution for “You do not have sufficient permissions to access this page.” — WordPress Plugin Settings Page Error

Posted by: mynag In: Solution & Tips

You probably have just upgraded your WordPress to the latest version after skipping many or you have consistently beenĀ  keeping track for any WordPress upgrades making sure it is always up-to-date. But you probably did not find the necessity and time to examine over every third party WordPress plugins for latest updates especially if you have over hundreds of them installed,who knows, well not until this error occur when you trying to click on that plugin’s settings page.

Solution 1 – Make sure the plugin is upgraded.

The solution is a simple one if the third party plugin author/creator is relentless about ensuring every plugins of his is compatible with the latest updates of WordPress. If you already know how to upgrade wordpress plugins, you can skip the following instruction.

At the administration page:

  1. Click on the Plugins on the right Menu panel (“Manage Plugins”)
  2. Find the name of the plugin in the list that is giving you the error at the settings page.
  3. If there is an available upgrade to the plugin, you should able to see right below the plugin a distinctively highlighted message “There is a new version of [Plugin name] plugin available. View version [version number] Details or upgrade automatically.” Simply click on “upgrade automatically” and let wordpress update the plugin.

Go the settings page again and see if this works for you.
If the upgrade does not fix the problem, then probably the plugin upgrade doesn’t correspond to your WordPress version. You could either contact the author about issue and wait for his fix. Or take matter into your own hands. Go to Solution 2.

Solution 2 — Fixed the Plugin code

If you are familiar with editing plugin’s PHP codes, this should be a piece of cake. It is not uncommon that some plugins only support earlier version of WordPress especially version 2 and below when the administrative menu of the WordPress still appears at the top.

  1. Under that plugin folder, search for the file that contains the text “add_action(‘admin_head’”
  2. The line should appear like this “add_action(‘admin_head’, ‘wpcf_add_options_page’);
    wpcf_add_options_page” is the name of the function that will be executed in “admin head”.
    For your case, it could a different function name. Let’s call it [function_name].
  3. Replace add_action(‘admin_head’,’[function_name]‘) with add_action(‘admin_menu’, ‘[function_name'). Notice that the admin_head is now replaced with admin_menu. That is because WordPress uses the side panel menu instead of the top menu bar from version 2 onwards.
  4. Next, find the function [function_name]. It could either be located in the same php file or in another php file within the plugin folder. It should look something like this:function wpcf_add_options_page()
    {
    add_options_page(‘Secure contact Options’, ‘Secure Contact’, ‘manage_options’, ‘secure-contact/options-contactform.php’);
    }In this case, wpcf_add_options_page is the [function_name] where “Secure Contact” is the name of the plugin.
  5. Just replace the word “add_options_page” to “add_submenu_page” and leave the rest as it is.

You should now be able to access the Settings page of the plugin.

No Responses to "Solution for “You do not have sufficient permissions to access this page.” — WordPress Plugin Settings Page Error"

Comment Form

Categories

About

Welcome to MynaG's Bits and Bytes. My little journal containing bits and bytes of the internet, web programming and etcetera