• Resolved letyourmoneygrow

    (@letyourmoneygrow)


    from error.log:

    [Sat Feb 18 07:00:29.704703 2017] [:error] [pid 1604] [client 66.249.89.141:58672] PHP Fatal error: Uncaught Error: Call to undefined function bp_is_page() in /var/www/html/wp-content/plugins/members-page-only-for-logged-in-users/members_page_only_for_logged_in_users.php:160\nStack trace:\n#0 /var/www/html/wp-includes/class-wp-hook.php(298): members_page_only_for_logged_in_users(Object(WP))\n#1 /var/www/html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)\n#2 /var/www/html/wp-includes/plugin.php(515): WP_Hook->do_action(Array)\n#3 /var/www/html/wp-includes/class-wp.php(746): do_action_ref_array(‘wp’, Array)\n#4 /var/www/html/wp-includes/functions.php(955): WP->main(”)\n#5 /var/www/html/wp-blog-header.php(16): wp()\n#6 /var/www/html/index.php(17): require(‘/var/www/html/w…’)\n#7 {main}\n thrown in /var/www/html/wp-content/plugins/members-page-only-for-logged-in-users/members_page_only_for_logged_in_users.php on line 160

Viewing 4 replies - 1 through 4 (of 4 total)
  • Same problem here. Any solutions?

    Ok I think that the problem is that function bp_is_page() is deprecated by Buddy Press. Try changing line 160 in the file members_page_only_for_logged_in_users.php from

    if ( is_user_logged_in() == false && ( bp_is_activity_component() || bp_is_groups_component() || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) || strpos($current_url,'/profile/')==true || strpos($current_url,'/friends/')==true || strpos($current_url,'/following/')==true || strpos($current_url,'/followers/')==true))

    to

    if ( is_user_logged_in() == false && ( bp_is_activity_component() || bp_is_groups_component() || bp_is_forums_component() || bp_is_blogs_component() || bp_is_current_component( BP_MEMBERS_SLUG ) || strpos($current_url,'/profile/')==true || strpos($current_url,'/friends/')==true || strpos($current_url,'/following/')==true || strpos($current_url,'/followers/')==true))

    Notice the use of bp_is_current_component instead of bp_is_page

    • This reply was modified 7 years, 9 months ago by avantwaves.

    Thanks @avantwave, that fixed it for me too.

    Thread Starter letyourmoneygrow

    (@letyourmoneygrow)

    @avantwaves, many thanks, works for me too!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Stopped working after upgrading BuddyPress from 2.7.4 to 2.8.0’ is closed to new replies.