• Just installed on a fresh WordPress blog using 3.1.3.

    Testing in debug mode, upon activation I received the following error:

    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /home/test/public_html/wp-includes/functions.php on line 3387

    Any ideas how to fix this?

Viewing 12 replies - 1 through 12 (of 12 total)
  • I have the same issue…. please, help us…!!!

    Do you have some plugin active? I was having the same problem with one of my oldest plugin, calling “add_submenu_page” with a numeric user level instead of a capability name.

    Thread Starter wpsecuritylock

    (@wpsecuritylock)

    No, I did not have any other plugin active.

    I have exactly the same problem. Same error, file and line, and no plugin activated.

    Yes the same here, what is this and how can i take this away is getting worse if I have installed. I need those plug in.

    “Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /var/www/web/wse336729/wp-includes/functions.php on line 3466”

    MB MB

    (@mikkelbreum)

    Same here, running WP v.3.2.1 and Audio-Player v.2.0.4.1

    I get:

    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /Users/mikkel/Dropbox/Safe/annikalundgren/wp-includes/functions.php on line 3466

    Uh oh I’m having the same problem here ??

    the solution is to disable plugin one by one, until you find the one causing the warning. Then, find a call like “add_submenu_page” or similar, using a numeric user level instead of a capability name.
    Substitute the numeric user level with a compatible capability or user role and the warning should vanish.

    I am having this problem and I am not sure how it started and how to fix it – any advice?

    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /home/department/wordpress/wp-includes/functions.php on line 3466

    To fix this problem, go to line 176 of audio-player.php (/wp-content/plugins/audio-player/audio-player.php).
    The line looks like this:
    $pageName = add_options_page("Audio player options", "Audio Player", 8, $this->optionsPageName, array(&$this, "outputOptionsSubpanel"));

    Change the 8 (a numeric user level) to ‘activate_plugins’ (single quotes included), so that the line looks like this:
    $pageName = add_options_page("Audio player options", "Audio Player", 'activate_plugins', $this->optionsPageName, array(&$this, "outputOptionsSubpanel"));

    istvannonn

    (@istvannonn)

    Thanks, cg433n
    it works for me for a different plugin.

    @cg433n,
    same problem with my own plugin… solved now, thanks !

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Notice: has_cap called with an argument that is deprecated’ is closed to new replies.