Forums

[Plugin: WordPress Download Monitor] 3.3.3.4 Broken (3 posts)

  1. poimenJohn
    Member
    Posted 2 years ago #

    Installed this update and it took all my blogs that use the plugin completely down.

    The php error that crashes the entire blog is:

    Fatal error: Call to a member function add_cap() on a non-object in /home1/dminorg/public_html/wp-content/plugins/download-monitor/init.php on line 54

    It's a bit of a mess, because you can't get into the admin panel to disable the plugin. SO you have to download a previous version, install that, then go in and DUMP THIS PLUGIN FAST.

    http://wordpress.org/extend/plugins/download-monitor/

  2. Mike
    Member
    Posted 2 years ago #

    Init.php line 53 :

    global $wp_roles;
    if (is_object($wp_roles)) :
    $wp_roles->add_cap( 'administrator', 'user_can_config_downloads' );
    $wp_roles->add_cap( 'administrator', 'user_can_edit_downloads' );
    $wp_roles->add_cap( 'administrator', 'user_can_add_new_download' );
    $wp_roles->add_cap( 'administrator', 'user_can_add_exist_download' );
    $wp_roles->add_cap( 'administrator', 'user_can_view_downloads_log' );
    endif;

    Unsure why your $wp_roles was undefined, but this will prevent the error.

  3. bcbccouk
    Member
    Posted 2 years ago #

    This happened to me on a wpmu install. I upgraded the plugin from the dashboard of a user blog. When I tried to get to the root blog the error came up. The fix above works fine to get things working again across all blogs.

Topic Closed

This topic has been closed to new replies.

About this Topic