#6606 closed defect (bug) (fixed)
Visibility issues with BP_Activity_List_Table::row_actions()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.3.4 | Priority: | normal |
| Severity: | normal | Version: | 2.3.3 |
| Component: | Core | Keywords: | has-patch |
| Cc: |
Description
Fatal error: Access level to BP_Activity_List_Table::row_actions() must be public (as in class WP_List_Table) in /home/public_html/wp-content/plugins/buddypress/bp-activity/bp-activity-admin.php on line 1777
Scoped from https://www.reddit.com/r/Wordpress/comments/3j8lc7/unable_to_log_into_admin_dashboard_after_update/
Attachments (4)
Change History (19)
#2
@
10 years ago
A few things:
WP_List_Table::row_actions()is protected in 4.3, and as far back as [WP28493]- BuddyPress uses
protectedin Activity & Groups, butpublicin Members. - BuddyPress claims to support as far back to WordPress 3.8, but
row_actions()was an assumedpublicmethod until WordPress 4.0.
Ways to address this:
- Make BuddyPress's
row_actions()methods public, which should still function on top ofprotectedmethods in WordPress 4.3 without fatal errors, though this should be tested to confirm. Debug notices here would be acceptable IMO, considering the circumstances. - Bump the support version to WordPress 4.0 in the next BuddyPress release (2.4) so this becomes a non-issue, support wise.
- The base
WP_List_Tableclass was always extended at our own risk, so we could, in theory, invent our ownBP_List_Tablebase class that is essentially a copy ofWP_List_Tablebut specialized to the needs of BuddyPress. This is a bad idea, but it's an option that may eventually be necessary ifWP_List_Tablesupport is never officially supported.
#3
follow-up:
↓ 4
@
10 years ago
BuddyPress uses protected in Activity & Groups, but public in Members.
BP_Groups_List_Table and BP_Activity_List_Table do not replace WP_List_Table::row_actions (though they use some actions and filters with a similar name). Only BP_Members_Admin replaces the method.
#4
in reply to:
↑ 3
@
10 years ago
Replying to DJPaul:
BuddyPress uses protected in Activity & Groups, but public in Members.
BP_Groups_List_TableandBP_Activity_List_Tabledo not replaceWP_List_Table::row_actions(though they use some actions and filters with a similar name). OnlyBP_Members_Adminreplaces the method.
You reviewed & committed r-a-y's patch in r10065 & r10066 for #6465. It specifically states:
Override WP_List_Table::row_actions().
Am I missing something?
#5
follow-up:
↓ 6
@
10 years ago
BuddyPress claims to support as far back to WordPress 3.8, but row_actions() was an assumed public method until WordPress 4.0.
Boo Ray. This is a case where copying WP and not thinking of older installs goes terribly wrong!
Changing the row_actions() method visibility to public should fix this issue.
#6
in reply to:
↑ 5
@
10 years ago
Replying to r-a-y:
Changing the
row_actions()method visibility topublicshould fix this issue.
01 patch attached takes this approach.
#7
@
10 years ago
@johnjamesjacoby i think we cannot bump to 4.0 in 2.4 as we already posted about bumping to 3.8 in 2.4 > https://bpdevel.wordpress.com/2015/08/06/wp-version-compatibility-guidelines/ a month ago (#6258)
#8
follow-up:
↓ 10
@
10 years ago
When testing .01.patch in 4.0 i got another fatal: Maximum function nesting level of '100' reached, aborting! in the Activity administration.
Groups Administration: no problem
When testing .01.patch in 3.9 i got another fatal: Call to undefined method BP_Activity_List_Table::get_primary_column_name() in the Activity administration.
So i'm suggesting .02.patch. I've tested it in: 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3 and trunk and i got no errors and no warnings.
It seems to fix the issue.
#9
@
10 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 2.3.4
- Version set to 2.3.3
6606.03.patch is 6606.02.patch updated to latest trunk
#10
in reply to:
↑ 8
@
10 years ago
Replying to imath:
When testing .01.patch in 4.0 i got another fatal:
Maximum function nesting level of '100' reached, aborting!in the Activity administration.
Groups Administration: no problem
When testing .01.patch in 3.9 i got another fatal:Call to undefined method BP_Activity_List_Table::get_primary_column_name()in the Activity administration.
So i'm suggesting .02.patch. I've tested it in: 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3 and trunk and i got no errors and no warnings.
It seems to fix the issue.
The fatal error is being caused by using BP trunk.
The problem was due to r10008, which was committed against trunk and referenced the get_primary_column_name() method, instead of get_default_primary_column_name().
However, r10007 is correct, but was only for 2.3-branch.
See r10095, which should fix this problem for trunk.
For this ticket, I would recommend 04.patch, which is basically 01.patch, but with updated phpDoc.
Probably same user here https://buddypress.org/support/topic/unable-to-log-into-admin-dashboard-after-update/