Support » Plugin: BP Profile Search » Help with PHP Fatal error!

  • I have BP networked activated on a secondary site in the main network of a WP-multi-network (subdomain) install.

    I just went to activate https://wordpress.org/plugins/bp-profile-search/ on that BP site and got a blank page. debug.log shows the following:

    PHP Fatal error: Call to a member function has_cap() on null in /home/mysite/public_html/wp-content/plugins/bp-profile-search/bps-main.php on line 158

    line 158 obviously has to do with roles n caps.

    if (! $role->has_cap ($cap)) $role->add_cap ($cap);

    I am logged in to the network as SuperAdmin, and am a member of the BP site.

    I was also activating other BP plugins at the same time, but did not receive any other errors.

    I have no wp-admin access to this site now, and I need help ASAP!

Viewing 1 replies (of 1 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    Hi gastronimo,

    I’m not sure why you get that fatal error, but this workaround should remove it.

    From your FTP client or control panel, delete the directory wp-content/plugins/bp-profile-search, and that will restore your site to normal.

    Then, before reinstalling BP Profile Search, add this code to your functions.php or bp-custom.php file:

    add_filter ('bps_form_caps', 'form_caps');
    function form_caps ($caps)
    {
    	return array ();
    }

    Please let me know if that works for you!

Viewing 1 replies (of 1 total)
  • The topic ‘Help with PHP Fatal error!’ is closed to new replies.