Support » Plugin: Media Tags » [Plugin: Media Tags] Fatal Error while activating plugin (mediatags_add_default_capabilities)

  • 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/

Viewing 1 replies (of 1 total)
  • AMGill

    (@amgill)

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Media Tags] Fatal Error while activating plugin (mediatags_add_default_capabilities)’ is closed to new replies.