User Photo
User Photo throwing some debug errors (6 posts)

  1. Suzanne Ahjira
    Posted 3 years ago #

    Hi guys, got the latest version of User Photo running on 3.5.1 and I also have debug turned on. Debug is throwing the following errors for User Photo which you may or may not know.

    Notice: load_plugin_textdomain was called with an argument that is deprecated since version 2.7 with no alternative available. in /var/www/edgemagazine.net/wp-includes/functions.php on line 2925 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/edgemagazine.net/wp-includes/functions.php on line 2923


  2. Michael
    Posted 3 years ago #

    I just wanted to pitch in that I get the exact same two errors.

    • load_plugin_textdomain called with a deprecated argument
    • has_cap called with a deprecated argument.

    I am also using 3.5.1 with WP_DEBUG turned on.

  3. nddery
    Posted 3 years ago #

    A solution can be found here : http://wordpress.org/support/topic/plugin-user-photo-current-version-causing-notices-warnings-fixed?replies=8

    You'll need to re-apply these changes every time you update the plugin until the authors of this plugin fixes this.

  4. Michael
    Posted 3 years ago #

    Thank you nddery, that thread you linked to contained fixes for the errors I was seeing. It seems as if the fixes are not very difficult, but the plugin just hasn't been updated in a while.

    If one is using version of user-photo, then patching it is not so difficult. Here is the reader's digest version.

    1. Change this line:

    load_plugin_textdomain('user-photo', PLUGINDIR . '/user-photo/localization');

    ...to this:

    load_plugin_textdomain('user-photo', false, dirname( plugin_basename( __FILE__ ) ) . '/localization/');

    2. Change this line:

    add_options_page('User Photo', 'User Photo', 8, __FILE__, 'userphoto_options_page');

    ...to this:

    add_options_page('User Photo', 'User Photo', 'add_users', __FILE__, 'userphoto_options_page');

    Patching the plugin will only work as long as you don't update the plugin. More information and ideas can be found in the thread that nddery linked to above.

  5. Uri @ initech
    Posted 3 years ago #

    I got the same 2 notices and implemented your patch and the notices were fixed. Plugin authors, please fix these notices.

  6. AngieP
    Posted 2 years ago #

    Will this patch also stop the plugin from deactivating periodically?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • User Photo
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.