Skip to:
Content

BuddyPress.org

Opened 22 months ago

Last modified 15 months ago

#8783 assigned defect (bug)

Fatal error on Manage Opt-outs admin page

Reported by: lenasterg's profile lenasterg Owned by: dcavins's profile dcavins
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version:
Component: Core Keywords: reporter-feedback
Cc:

Description

Hi.
I use BuddyPress 10.6.0, WordPress 6.1.1 on PHP 8.1, multisite installation.

I get the following Fatal error when I visit the /wp-admin/network/admin.php?page=bp-optouts page.

[20-Dec-2022 09:40:11 UTC] PHP Fatal error:  Uncaught Error: Call to a member function prepare_items() on null in \wp-content\plugins\buddypress\bp-core\admin\bp-core-admin-optouts.php:280
Stack trace:
#0 \wp-content\plugins\buddypress\bp-core\admin\bp-core-admin-optouts.php(261): bp_core_optouts_admin_index()
#1 \wp-includes\class-wp-hook.php(308): bp_core_optouts_admin()
#2 \wp-includes\class-wp-hook.php(332): WP_Hook->apply_filters()
#3\wp-includes\plugin.php(517): WP_Hook->do_action()
#4 \wp-admin\admin.php(259): do_action()
#5 \wp-admin\network\admin.php(13): require_once('...')
#6 {main}
  thrown in \wp-content\plugins\buddypress\bp-core\admin\bp-core-admin-optouts.php on line 280

Attachments (2)

bp-activated-network.png (51.1 KB) - added by dcavins 22 months ago.
Network plugin screen
bp-activated-network-on-site.png (46.6 KB) - added by dcavins 22 months ago.
Network single site plugin screen

Download all attachments as: .zip

Change History (14)

#1 @imath
22 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 10.7.0

Hi @lenasterg thanks for your report, @dcavins, could you have a look at it?

#2 @dcavins
22 months ago

  • Owner set to dcavins
  • Status changed from new to assigned

#3 @dcavins
22 months ago

Hi @lenasterg,

Thank you for your report. I tried the following combinations (all WP network/multisite) and couldn't replicate your error:
WP 6.0.3/BP 10.4/PHP 8.1.9 Works as expected
WP 6.1.1/BP 10.4/PHP 8.1.9 Works as expected
WP 6.1.1/BP 10.6/PHP 8.1.9 Works as expected

Your error suggests that $bp_optouts_list_table is not being created upon loading that admin screen (that happens in bp_core_optouts_admin_load() at the load-tools_page_bp-optouts action). Could another plugin or potentially your theme be changing that load action?

Thanks again for your report, and for any other information you can provide.

#4 @imath
22 months ago

  • Keywords reporter-feedback added; needs-patch removed

Thanks a lot @dcavins for your tests. I just tested myself with WP Multisite having BuddyPress activated on the network and having BuddyPress activated on the main site of the network. I confirm I haven't seen anything going wrong inside the Manage Opt-out tools screen.

@lenasterg do you have any other inputs about how we can reproduce the issue?

#5 @lenasterg
22 months ago

Hi again.
So I noticed the following.
If the BuddyPress is activated only in the main site there is no error. Sidenote: the 'BuddyPress Tools' submenu is under the main's site admin 'Tools' menu.

If the BuddyPress is network activated, then the described error occurs - Sidenote the 'BuddyPress Tools' is under the 'Tools' on the network admin page, which is created when BuddyPress gets activated.

#6 @dcavins
22 months ago

Hi @lenasterg,

Thanks for your responsse. I'm going to post a couple of images of how I've got BP setup on my test network. Can you tell me if I'm testing the situation in which you see the issue? Thanks!

@dcavins
22 months ago

Network plugin screen

@dcavins
22 months ago

Network single site plugin screen

#7 @lenasterg
22 months ago

Hi @dcavins.
Yes it's network activated. Then you have to go to your wp-admin/network/admin.php?page=bp-optouts to get the fatal error.

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


21 months ago

#9 @imath
21 months ago

Hi @lenasterg

Our problem is that, for us going at the URL you mentioned doesn't generate a fatal, see screenshot below:

https://cldup.com/qkxPgrDwM0.png

If there's an issue it should be located there: https://core.trac.wordpress.org/browser/tags/6.1.1/src/wp-admin/admin.php#L216 I'd be very interested to know what's the value of the $page_hook of this line for your site.

#10 @imath
21 months ago

  • Milestone changed from 10.7.0 to Up Next

#11 @imath
21 months ago

  • Milestone changed from Up Next to 12.0.0

#12 @imath
15 months ago

  • Milestone changed from 12.0.0 to Awaiting Contributions

Is this bug still happening? As we were not able to replicate I don't know what to do about it 🤔. There's probably a specific setting used to make it happen we don't manage to identify.

Note: See TracTickets for help on using tickets.