WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Suzanne Ahjira
    Member
    Posted 11 months 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

    http://wordpress.org/extend/plugins/user-photo/

  2. Michael
    Member
    Posted 10 months 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
    Member
    Posted 10 months 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
    Member
    Posted 9 months 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 0.9.5.2 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
    Member
    Posted 9 months ago #

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

  6. AngieP
    Member
    Posted 7 months ago #

    Will this patch also stop the plugin from deactivating periodically?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.