[buddypress-trac] [BuddyPress Trac] #6506: Should not try to redirect in bp_has_message_threads
buddypress-trac
noreply at wordpress.org
Mon Jun 15 16:39:04 UTC 2015
#6506: Should not try to redirect in bp_has_message_threads
-----------------------------------+-----------------
Reporter: johnjamesjacoby | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.4
Component: Component - Messaging | Version: 1.0
Severity: normal | Keywords:
-----------------------------------+-----------------
In `bp_has_message_threads()` is a bit of code intended to redirect a non-
capable member from the "Notices" area. Unfortunately,
`bp_has_message_threads()` is a template function, and is only ever called
after headers have been sent and page output has started.
At best, in themes that rely on `bp-default` or `bp-legacy` this code is
dead, as `messages_screen_notices()` is also wrapped in
`bp_current_user_can( 'bp_moderate' )` checks to avoid hooked in and/or
executed.
At worst, in themes that already come with their own BuddyPress template
parts, members who navigate to the notices URL manually (it's not made
visible in the UI) are greeted with the following debug notice and/or an
empty page:
{{{
Warning: Cannot modify header information - headers already sent by
(output started at /srv/www/wordpress-develop/src/wp-
includes/formatting.php:4154) in /srv/www/wordpress-develop/src/wp-
includes/pluggable.php on line 1205
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6506>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list