WordPress.org

Ready to get started?Download WordPress

Forums

Media Tags
Fatal Error while activating plugin (mediatags_add_default_capabilities) (2 posts)

  1. sprenger
    Member
    Posted 2 years ago #

    I couldn't activate the plugin, because of the following fatal error:

    Fatal error: Call to a member function add_cap() on a non-object in wp-content/plugins/media-tags/mediatags_admin.php on line 364

    I suppose, it occured because my installation doesn't have the default user roles anymore.

    I was able to help myself in changing the following lines in the plugin:

    $role = get_role('contributor');
    $role->add_cap(MEDIATAGS_ASSIGN_TERMS_CAP);

    into that one:

    $role = get_role('contributor');
    if($role){
        $role->add_cap(MEDIATAGS_ASSIGN_TERMS_CAP);
    }

    Maybe that will help others with the same issues.

    http://wordpress.org/extend/plugins/media-tags/

  2. AMGill
    Member
    Posted 2 years ago #

    OMG @sprenger. Thank you so much. I have been testing & searching for a solution to the same error message for an hour. It looks like perhaps this need to be fixed by the developer since I am not the only one.

    Your solution worked perfectly.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags