• Resolved jim1001

    (@jim1001)


    On trying to activate I got message:

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Call to a member function add_cap() on a non-object in /afs/mcc/common/WWW/Zorn/Roots/ndrpdevz/wp-content/plugins/capability-manager-enhanced/includes/manager.php on line 198

    Please advise. Thanks.

    https://www.ads-software.com/plugins/capability-manager-enhanced/

Viewing 1 replies (of 1 total)
  • Plugin Author Kevin Behrens

    (@kevinb)

    Apparently your site does not have a role named ‘administrator’ defined. I’ve never seen that before. To work around it, you can temporarily add these lines at the top of function SetAdminCapability in includes/manager.php:

    add_role('administrator', 'Administrator');
    $role = get_role('administrator');
    $role->add_cap('manage_capabilities');
    $role->add_cap('switch_themes');
    $role->add_cap('edit_themes');
    $role->add_cap('activate_plugins');
    $role->add_cap('edit_plugins');
    $role->add_cap('edit_users');
    $role->add_cap('edit_files');
    $role->add_cap('manage_options');
    $role->add_cap('moderate_comments');
    $role->add_cap('manage_categories');
    $role->add_cap('manage_links');
    $role->add_cap('upload_files');
    $role->add_cap('import');
    $role->add_cap('unfiltered_html');
    $role->add_cap('edit_posts');
    $role->add_cap('edit_others_posts');
    $role->add_cap('edit_published_posts');
    $role->add_cap('publish_posts');
    $role->add_cap('edit_pages');
    $role->add_cap('read');
    $role->add_cap('level_10');
    $role->add_cap('level_9');
    $role->add_cap('level_8');
    $role->add_cap('level_7');
    $role->add_cap('level_6');
    $role->add_cap('level_5');
    $role->add_cap('level_4');
    $role->add_cap('level_3');
    $role->add_cap('level_2');
    $role->add_cap('level_1');
    $role->add_cap('level_0');
Viewing 1 replies (of 1 total)
  • The topic ‘Fatal installation error: Call to a member function add_cap() on a non-object’ is closed to new replies.