Opened 3 years ago
Closed 3 years ago
#3379 closed defect (bug) (fixed)
undefined $topic_id with buddypress
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Cc: |
Description
These errors appear in dashboard with just bbpress and buddypress
Notice: Undefined variable: topic_id in /www/sites/e12/ee6/gos.rewweb.co.uk/web/wp-content/plugins/bbpress/includes/replies/template.php on line 461
Notice: Undefined variable: topic_id in /www/sites/e12/ee6/gos.rewweb.co.uk/web/wp-content/plugins/bbpress/includes/replies/template.php on line 467
Attachments (2)
Change History (9)
#1
@
3 years ago
$topic_id is not being set in bbp_get_reply_url
<?php // Juggle reply & topic IDs for unpretty URL formatting if ( bbp_is_reply( $reply_id ) ) { $topic_id = bbp_get_reply_topic_id( $reply_id ); $topic = bbp_get_topic( $topic_id ); } elseif ( bbp_is_topic( $reply_id ) ) { $topic_id = bbp_get_topic_id( $reply_id ); $topic = bbp_get_topic( $topic_id ); $reply_id = $topic_id; }
#2
@
3 years ago
- Milestone changed from Awaiting Review to 2.6.6
- Owner set to johnjamesjacoby
- Status changed from new to assigned
Hey @robin-w! Always nice to see ya 👋
Is it possible to get the call stack to that point?
I'm having a hard time imagining a reason why bbp_get_reply_url()
would be called on the Plugins page in WordPress Admin. Maybe BuddyPress Notifications has one pending that's trying to link to something incorrectly? If so, that would be indicative of a bug someplace else.
If $reply_id
is neither a topic nor a reply, there isn't much of a URL to get. 😁
#3
@
3 years ago
only appears for keymasters !
NOTICE: wp-content/plugins/bbpress/includes/replies/template.php:461 - Undefined variable: topic_id require_once('wp-admin/admin-header.php'), do_action('in_admin_header'), WP_Hook->do_action, WP_Hook->apply_filters, wp_admin_bar_render, do_action_ref_array('admin_bar_menu'), WP_Hook->do_action, WP_Hook->apply_filters, bp_members_admin_bar_notifications_menu, bp_notifications_toolbar_menu, bp_notifications_get_notifications_for_user, apply_filters_ref_array('bp_notifications_get_notifications_for_user'), WP_Hook->apply_filters, bbp_format_buddypress_notifications, bbp_get_reply_url
dashboard photo