WordPress.org

Forums

Facebook AWD All in one
[resolved] Install error (4 posts)

  1. yukiko-kawa
    Member
    Posted 2 years ago #

    when active plug-in I have this error in admin panel:

    Fatal error: Call to a member function add_cap() on a non-object in /home/bvzynpv/public_html/bibyportal.net/astreaming/wp-content/plugins/facebook-awd/AWD_facebook.php on line 506

    Plug-in installed on site

    Advanced Access Manager
    Akismet
    Archivist - Custom Archive Templates
    Avatars
    Collapsing Categories
    Content Progress
    Custom Content List
    Custom Content Type Manager
    Duplicate Post
    FPW Post Instructions
    GD Star Rating
    Google Analytics Tracking Code Embeder
    KK I Like It
    My Videotag
    Plugin Notes
    Private Messages For WordPress
    RB Internal Links
    Revisionary
    Simple History
    Social Login for wordpress
    Social Sharing Toolkit
    TinyMCE Advanced
    WP-Memory-Usage
    WP-UserOnline
    WP Report Error
    WP Super Cache
    WP UI - Tabs, accordions and more.

    http://wordpress.org/extend/plugins/facebook-awd/

  2. AHWEBDEV
    Member
    Plugin Author

    Posted 2 years ago #

    You have a plugin that modify or remove the default role of WP ?

  3. yukiko-kawa
    Member
    Posted 2 years ago #

  4. AHWEBDEV
    Member
    Plugin Author

    Posted 2 years ago #

    So will have problem, if this plugin remove the default roles the plugin can't work.

    The plugin provide multiple features depending of the user roles.
    As example, an editor can select pages in admin to publish on...
    So if the plugin redefine the capabilities on role this can't work.

    To help you understand, you can look in the class AWD_facebook.php

    /**
     * Set Admin Roles
     * Add FB capabalities to default WP roles
     * @return void
     */
    public function set_admin_roles()
    {
    	$roles = array(
    			'administrator' => array(
    					'manage_facebook_awd_settings',
    					'manage_facebook_awd_plugins',
    					'manage_facebook_awd_opengraph',
    					'manage_facebook_awd_publish_to_pages'
    				),
    			'editor' => array(
    					'manage_facebook_awd_publish_to_pages',
    					'manage_facebook_awd_opengraph'
    				),
    			'author' => array(
    					'manage_facebook_awd_publish_to_pages'
    				)
    			);
    	$roles = apply_filters('AWD_facebook_admin_roles', $roles);
    	foreach ($roles as $role => $caps) {
    		$wp_role = get_role($role);
    		foreach ($caps as $cap) {
    			$wp_role->add_cap($cap);
    		}
    	}
    }

    Maybe this will help you to add the good capabilities to your custom roles...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.