Opened 22 months ago
Last modified 15 months ago
#8783 assigned defect (bug)
Fatal error on Manage Opt-outs admin page
Reported by: | lenasterg | Owned by: | 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)
Change History (14)
#3
@
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
@
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
@
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
@
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!
#7
@
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
@
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:
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.
Hi @lenasterg thanks for your report, @dcavins, could you have a look at it?